Is Operator

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

Syntax

#object Is { #object_2 | class_name | Object }

Parts

#object
An expression that evaluates to an object reference.
#object_2
An expression that evaluates to an object reference. Is tests if the two references are the same object.
class_name
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.

Instructions

Examples

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

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