Is Operator

Compares the type of an object to a class, or compares two object references.

Syntax

#object Is { #object2 | className | Object }

Parts

#object
An expression that evaluates to an object reference.
#object2
An expression that evaluates to an object reference. Is tests if the two references are the same object.
className
The name of a class. Is tests if the object has the interface of that class.
Object
Is tests if the reference is a valid object.

Details

Examples

' Assume that EditMenu is derived from Menu
EditMenu #edit, "&Edit"

' Test if #edit is a Menu
Dim isMenu As Boolean = #edit Is Menu