Option Strict On disallows operands of type Object for operator '<operatorname>'

Option Strict On disallows operands of type Object for operator '<operatorname>'. Use the Is operator to test for object identity.

An arithmetic comparison operator such as = is used with one or more object variables when Option Strict is On.

Error ID: BC32013

To correct this error

  1. Turn Option Strict Off if the object variables contain numeric values and you intend an arithmetic comparison.

  2. Use the Is operator to compare for object identity.

See Also

Reference

Comparison Operators (Visual Basic)

Is Operator (Visual Basic)

Option Strict Statement