Mono Class Library: System.Type Overview | Members

System.Type.DeclaringMethod Property

If the current Type represents a type parameter of a generic method, gets a System.Reflection.MethodInfo that represents the declaring method.

public virtual System.Reflection.MethodBase DeclaringMethod { get; }

Value

If the current Type represents a type parameter of a generic method, a System.Reflection.MethodInfo that represents the declaring method; otherwise null.

Remarks

The declaring method is a generic method definition. That is, if Type.DeclaringMethod does not return null, then DeclaringMethod.IsGenericMethodDefinition returns true.

The Type.DeclaringType and Type.DeclaringMethod properties identify the generic type definition or generic method definition where the generic type parameter was originally defined:

For a list of the invariant conditions for terms used in generic reflection, see the Type.IsGenericType property description.

Operation

This property is read-only.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0