MethodInfo Class
Namespace: System.Reflection
Represents a method on a type. You can use the
MethodInfo
class to discover information about methods and to invoke them dynamically.
Inheritance
Members
-
Name
get;Gets the name of the current member.
-
ReturnType
get;Gets the return type of the method.
-
IsPublic
get;Indicates whether the current method is public.
-
IsStatic
get;Indicates whether the current method is static.
-
Invoke
object Invoke(object obj, object[] parameters)When overridden in a derived class, invokes the method or constructor represented by the current instance, with the specified instance and argument values.
Parameters:obj
: The object on which to invoke the method. If the method is static, this argument is ignored.parameters
: An array of argument values to pass to the method or constructor represented by the current instance.
-
GetParameters
ParameterInfo[] GetParameters()Gets the parameters of the method.
-
DeclaringType
get;Gets the class that declares the current member.