public abstract class MethodInfo : MethodBase
Object
MemberInfo
MethodBase
MethodInfo
mscorlib
Reflection
Provides access to method metadata.
System.Reflection Namespace
MethodInfo Constructors
MethodInfo Methods
MethodInfo.GetBaseDefinition Method
MethodInfo Properties
protected MethodInfo();
Constructs a new instance of the MethodInfo class.
System.Reflection.MethodInfo Class, System.Reflection Namespace
public abstract MethodInfo GetBaseDefinition();
Returns a new MethodInfo instance that reflects the first definition of the method reflected by the current instance in the inheritance hierarchy of that method.
A new MethodInfo instance that reflects the first definition of the method reflected by the current instance in the inheritance hierarchy of that method.
[Behaviors: System.Reflection.MethodInfo.GetBaseDefinition proceeds along the inheritance hierarchy of the method reflected by the current instance, returning a MethodInfo instance that reflects the first definition in the hierarchy of that method.The method declaration to be reflected by the new MethodInfo instance is determined as follows:
]
- If the method reflected by the current instance overrides a virtual definition in the base class, the virtual definition is reflected.
- If the method reflected by the current instance is specified with the
new
keyword, the current instance is returned.- If the method reflected by the current instance is not defined in the type of the object on which System.Reflection.MethodInfo.GetBaseDefinition is called, the method definition of the furthest ancestor in the class hierarchy is reflected.
System.Reflection.MethodInfo Class, System.Reflection Namespace
public abstract Type ReturnType { get; }
Gets the type of the return value of the method reflected by the current instance.
The Type of the return value of the method reflected by the current instance. This property is equal to the Type object representing Void if the return value of the method isvoid
.
[Behaviors: This property is read-only.]
System.Reflection.MethodInfo Class, System.Reflection Namespace