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

The only operators defined for object variables are Is and TypeOf...Is. When Option Strict is On, all operands must be of data types defined for the given operator.

Error ID: BC30038

To correct this error

  • Use the appropriate type conversion functions, such as CInt or CStr, to convert the operands to data types defined for the operator.

See Also

Concepts

Comparison Operators in Visual Basic

Reference

Is Operator (Visual Basic)

Type Conversion Functions