Mono Class Library: System.Reflection.MethodInfo Overview | Members

System.Reflection.MethodInfo.GetBaseDefinition Method

Returns a new System.Reflection.MethodInfo instance that reflects the first definition of the method reflected by the current instance in the inheritance hierarchy of that method. [Edit]

public abstract MethodInfo GetBaseDefinition ()

Returns

A new System.Reflection.MethodInfo instance that reflects the first definition of the method reflected by the current instance in the inheritance hierarchy of that method. [Edit]

Remarks

Operation

MethodInfo.GetBaseDefinition proceeds along the inheritance hierarchy of the method reflected by the current instance, returning a System.Reflection.MethodInfo instance that reflects the first definition in the hierarchy of that method.

The method declaration to be reflected by the new System.Reflection.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 MethodInfo.GetBaseDefinition is called, the method definition of the furthest ancestor in the class hierarchy is reflected.
[Edit]

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0