This topic has not yet been rated - Rate this topic

Object.getType Function

Returns the type of a specified object instance.

var typeVar = Object.getType(instance);

Term

Definition

instance

The object to return the type for.

A type instance that represents the run-time object of instance.

Exception type

Condition

Error.argumentUndefined Function

(Debug) instance is undefined.

Error.argumentNull Function

(Debug) instance is null.

Use the getType function to get a new type instance that represents the run-time type of an object.

The following example shows how to use the getType function to create a new type instance that represents the run-time type of an object. It then displays information based on the object type.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.