Gets a System.Reflection.MethodBase that represents the declaring method, if the current Type represents a type parameter of a generic 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 in which the generic type parameter was originally defined:
If the Type.DeclaringMethod property returns a System.Reflection.MethodInfo, that System.Reflection.MethodInfo 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 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.
Getting the Type.DeclaringMethod property on a type whose Type.IsGenericParameter property is false throws an InvalidOperationException.
The System.Reflection.MethodBase that is returned by the Type.DeclaringMethod property is either a System.Reflection.MethodInfo in the case of a generic method, or a System.Reflection.ConstructorInfo in the case of a generic constructor.
In the .NET Framework version 2.0, generic constructors are not supported.
For a list of the invariant conditions for terms used in generic reflection, see the Type.IsGenericType property remarks.