Edit

Operator '<operator>' must have a return type of Boolean

A comparison or logical operator is declared with a return type other than the Boolean Data Type.

The result of a comparison operator (=, <>, <, <=, >, >=, Is, IsNot, IsFalse, IsTrue, Like, TypeOf) can be only True or False. For more information, see Comparison Operators in Visual Basic.

Logical operators (And, AndAlso, Not, Or, OrElse, Xor) work entirely within the domain of Boolean values. For more information, see Logical and Bitwise Operators in Visual Basic.

Error ID: BC33023

To correct this error

  • Replace the return type of this comparison or logical operator with Boolean.

See also