Udostępnij za pośrednictwem


'IsNot' requires operands that have reference types, but this operand has the value type '<typename>'.

An expression uses the IsNot Operator with at least one value type operand.

The IsNot operator determines whether two object references refer to different objects. It compares the pointer values of reference types and is meaningless with value types.

Error ID: BC31419

To correct this error

  • If you intend to compare the values of two value types, use the = or <> comparison operator.

  • If you intend to compare the pointers of two reference types, be sure you are using object references for both operands. You can use reference variables or elements, such as the Me keyword, that behave like reference variables.

See Also

Tasks

How to: Test Whether Two Objects Are the Same

Concepts

Comparison Operators in Visual Basic