Sandbox.MethodDescription[] Methods { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Methods property provides access to all the methods defined within a specific type. It returns an array of MethodDescription objects, each representing a method of the type described by the TypeDescription class.

Usage

Use the Methods property to retrieve detailed information about each method in a type, such as its name, parameters, return type, and other metadata. This can be particularly useful for reflection purposes, where you need to dynamically inspect or invoke methods.

Example

// Example of accessing the Methods property
TypeDescription typeDescription = TypeLibrary.GetType("MyNamespace.MyClass");
MethodDescription[] methods = typeDescription.Methods;

foreach (var method in methods)
{
    Console.WriteLine($"Method Name: {method.Name}");
    Console.WriteLine($"Return Type: {method.ReturnType}");
    // Additional method details can be accessed here
}