TypeDescription BaseType { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The BaseType property of the TypeDescription class provides access to the base type of the described type. This property can return null if the type is not present in the type library.

Usage

Use the BaseType property to retrieve the base type of a given type described by a TypeDescription instance. This is useful for understanding the inheritance hierarchy of a type.

Example

// Example of accessing the BaseType property
TypeDescription typeDescription = TypeLibrary.GetType("MyNamespace.MyClass");
TypeDescription baseType = typeDescription.BaseType;

if (baseType != null)
{
    Console.WriteLine($"Base type: {baseType.FullName}");
}
else
{
    Console.WriteLine("The base type is not available in the type library.");
}