Is Operator
Compares the type of an object to a given interface, or compares two object references.
Syntax
object_1 Is object_2
or
object_1 Is interface_name
or
object_1 Is Object
Parts
object_1- An object reference.
object_2- An object reference.
“
Is” returns true if the two references are the same object. interface_name- The name of a class or trait.
“
Is”) returns true if the object has the interface of that type. You can put one of the optional keywordsClassorTraitbefore this name to make your code clearer. Object- “
Is” returns true ifobject_1is not#Null.
Instructions
TODO
Examples
' EditMenu inherits from Menu.
New EditMenu edit, "&Edit"
' ...
' Find if #edit is a Menu.
If edit Is Menu Then
' do something with edit.
End If