The Methods
property provides access to all methods associated with the type described by the TypeDescription
class. It returns an array of MethodDescription
objects, each representing a method of the type.
The Methods
property provides access to all methods associated with the type described by the TypeDescription
class. It returns an array of MethodDescription
objects, each representing a method of the type.
Use the Methods
property to retrieve detailed information about each method defined in the type. This can be useful for reflection purposes, such as dynamically invoking methods or analyzing method signatures.
// Example of accessing the Methods property TypeDescription typeDescription = TypeLibrary.GetType("MyNamespace.MyClass"); MethodDescription[] methods = typeDescription.Methods; foreach (var method in methods) { // Output method name Console.WriteLine(method.Name); // Output method parameters foreach (var parameter in method.Parameters) { Console.WriteLine($"Parameter: {parameter.Name}, Type: {parameter.ParameterType}"); } }