Operator '<operatorname>' is not defined for types '<type1>' and '<type2>'

You have attempted to use a binary operator to perform an operation that is not valid for the two value-returning code elements involved.

Error ID: BC30452

To correct this error

  • Check the two elements and make sure they are compatible.

See Also

Concepts

Operators and Expressions in Visual Basic

Efficient Combination of Operators

Reference

Operator Precedence in Visual Basic