Is Operator

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

Syntax

#object Is className
or
#object Is #object2

Parts

#object
An expression that evaluates to an object reference.
className
The name of a class
#object2
An expression that evaluates to an object reference.

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