Description
The TargetType
property of the TypeDescription
class provides the System.Type
that this class describes. It is a non-static, public property that allows you to access the underlying type information that the TypeDescription
instance is wrapping.
Usage
Use the TargetType
property when you need to access the System.Type
of the object that the TypeDescription
is describing. This can be useful for reflection purposes, such as when you need to inspect the type's methods, properties, or other metadata.
Example
// Example of accessing the TargetType property
TypeDescription typeDescription = TypeLibrary.GetTypeDescription(typeof(MyClass));
System.Type targetType = typeDescription.TargetType;
// Use targetType for reflection or other type-related operations
Console.WriteLine($"The target type is: {targetType.FullName}");