<div class="meta" robots="noindex">

</div>

Method

# Xojo.Introspection.GetType

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Introspection.GetType<introspection.gettype>` as a replacement.

</div>

## Description

Gets a TypeInfo object that describes the supplied object. Before you can do anything with introspection, you need to use this method to get a TypeInfo object.

## Notes

You can supply any data type, including simple types (Integer, Text, etc.), object instances, arrays and structures.

Each TypeInfo instance that is returned is unique and immutable, so two objects of the same class will always return the same TypeInfo instance.

For classes, you must supply an instance. If you want to get TypeInfo for a class itself, use the GetTypeInfo command.

## Sample code

Gets the TypeInfo for an object and displays its name:

``` xojo
Using Xojo.Introspection
Dim info As TypeInfo = GetType(Self)
Label1.Text = "Object name: " + info.Name
```

## Compatibility

All project types on all supported operating systems.
