If the current Type represents a type parameter of a generic method, gets a System.Reflection.MethodInfo that represents the declaring method.
If the current Type represents a type parameter of a generic method, a System.Reflection.MethodInfo that represents the declaring method; otherwise null.
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:
- If the Type.DeclaringMethod property returns a System.Reflection.MethodBase, that System.Reflection.MethodBase represents a generic method definition, and the current Type object represents a type parameter of that generic method definition.
- If the Type.DeclaringMethod property returns a null, then the Type.DeclaringType property always returns a Type object representing a generic type definition, and the current Type object represents a type parameter of that generic type definition.
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.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0