Sandbox.FieldDescription[] Fields { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Fields property of the TypeDescription class provides access to all the fields defined on the type described by this instance. It returns an array of FieldDescription objects, each representing a field within the type.

Usage

Use the Fields property to retrieve detailed information about each field in a type, such as its name, type, and any attributes applied to it. This can be particularly useful for reflection purposes, where you need to dynamically inspect or manipulate the fields of a type.

Example

// Example of accessing the Fields property
TypeDescription typeDescription = TypeLibrary.GetTypeDescription(typeof(MyClass));
FieldDescription[] fields = typeDescription.Fields;

foreach (var field in fields)
{
    Console.WriteLine($"Field Name: {field.Name}, Field Type: {field.FieldType}");
}