Introspection.GetType

From Xojo Documentation

Method

Introspection.GetType(base as Object) As TypeInfo

Supported for all project types and targets.

Returns a TypeInfo object for the passed object. Each TypeInfo instance is unique and immutable, so two objects of the same class will always return the same TypeInfo.

Example

The following example in the Action event of a PushButton in a window gets information about the class instance and displays the name of its class.

Var tcp As New TCPSocket
Var t As Introspection.TypeInfo
t = Introspection.GetType(tcp)

MessageBox("My class name is " + t.Name)

See Also

Introspection module