Mono Class Library: System.Reflection Namespace

System.Reflection.MethodInfo Class

Discovers the attributes of a method and provides access to method metadata. [Edit]

See Also: MethodInfo Members

System.Object
     System.Reflection.MemberInfo
          System.Reflection.MethodBase
               System.Reflection.MethodInfo

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComDefaultInterface(typeof(System.Runtime.InteropServices._MethodInfo))]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class MethodInfo : MethodBase, System.Runtime.InteropServices._MethodInfo

Thread Safety

This type is safe for multithreaded operations.

Permissions

TypeReason
!:ReflectionPermission [Edit] Requires permission to reflect non-public members of a type in loaded assemblies. See System.Security.Permissions.ReflectionPermissionFlag.TypeInformation.

Remarks

Instances of System.Reflection.MethodInfo are obtained by calling the Type.GetMethods or Type.GetMethodmethod of a Type object or of an object that derives from System.Type, or by calling the MethodInfo.MakeGenericMethod(Type[])(System.Type[]) method of a System.Reflection.MethodInfo that represents a generic method definition.

For a list of the invariant conditions for terms specific to generic methods, see the MethodInfo.IsGenericMethod property. For a list of the invariant conditions for other terms used in generic reflection, see the Type.IsGenericType property.

Note:

When operating on the given kinds of methods, the following properties return the result as shown:

PropertyNon-GenericOpen GenericClosed Generic
IsGenericMethodDefinitionFalseTrueFalse
ContainsGenericParametersFalseTrueFalse
IsGenericMethodFalseTrueTrue
[Edit]

Requirements

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