IsNot Operator (Visual Basic)
Visual Studio 2012
Compares two object reference variables.
result = object1 IsNot object2
The IsNot operator determines if two object references refer to different objects. However, it does not perform value comparisons. If object1 and object2 both refer to the exact same object instance, result is False; if they do not, result is True.
IsNot is the opposite of the Is operator. The advantage of IsNot is that you can avoid awkward syntax with Not and Is, which can be difficult to read.
You can use the Is and IsNot operators to test both early-bound and late-bound objects.
Note
|
|---|
|
The IsNot operator cannot be used to compare expressions returned from the TypeOf operator. Instead, you must use the Not and Is operators. |
Note