Message <Context> "<expression1>" and "<expression2>" cannot be compared for equality or inequality. Description Because of their types, the two expressions cannot be compared for equality or inequality. The rules for which types can be compared are rather complicated and differ based upon the compiler mode. Refer to the language documentation for a complete list of valid combinations. User Action Modify the comparison to use valid types. This can often be done by casting one of the expressions to the type of the other.