typeGetMethods
TypeGetMethods is a method in the .NET Framework, specifically within the System.Type class, used to retrieve an array of MethodInfo objects that represent all the public methods of the current Type. This method is part of the System.Reflection namespace, which provides the infrastructure for inspecting and manipulating metadata at runtime.
The TypeGetMethods method can be overloaded to provide different levels of filtering for the methods it returns.
For example, to retrieve all public instance methods of a type, a developer might use the following
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public);
This code snippet first obtains the Type object for MyClass, then calls GetMethods with the appropriate BindingFlags
TypeGetMethods is particularly useful in scenarios where the structure of a type is not known at compile