bool TryGetType( System.Type t, Sandbox.TypeDescription& typeDescription )
bool TryGetType( Sandbox.TypeDescription& typeDescription )

robot_2Generated
code_blocksInput

Description

The TryGetType method attempts to retrieve a TypeDescription for a given System.Type. It returns a boolean indicating whether the operation was successful. If successful, the typeDescription parameter will contain the corresponding TypeDescription object.

Usage

To use the TryGetType method, you need to provide a System.Type object as the first parameter. The second parameter is an out parameter that will hold the TypeDescription if the method returns true.

Example usage:

TypeDescription typeDesc;
bool result = typeLibraryInstance.TryGetType(typeof(MyClass), out typeDesc);
if (result)
{
    // Use typeDesc here
}
else
{
    // Handle the case where the type description was not found
}

Example

TypeDescription typeDesc;
bool result = typeLibraryInstance.TryGetType(typeof(MyClass), out typeDesc);
if (result)
{
    // Use typeDesc here
}
else
{
    // Handle the case where the type description was not found
}