Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Typeof FunctionThis standard VB function returns a value indicating whether an object is of a given class. SyntaxIf Typeof objectVariable Is className Then... ReturnsThe Typeof function returns -1 if the object is of the specified type, 0 if it is not. UsageTypeof can be used only in an If statement and cannot be combined with other Boolean operators. That is, Typeof can be used only exactly as shown in the syntax line. To test whether an object does not belong to a class, use the following code structure:
See AlsoCreateObject Function |
Siebel VB Language Reference |