The declaring method is a generic method definition. That is, if DeclaringMethod does not return a null reference (Nothing in Visual Basic), then DeclaringMethod.IsGenericMethodDefinition returns true.
The DeclaringType and DeclaringMethod properties identify the generic type definition or generic method definition in which the generic type parameter was originally defined:
If the DeclaringMethod property returns a MethodInfo, that MethodInfo represents a generic method definition, and the current Type object represents a type parameter of that generic method definition.
If the DeclaringMethod property returns a null reference (Nothing in Visual Basic), then the 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.
The following code example defines a class that has a generic method, assigns a type argument to the method, and invokes the resulting constructed generic method. It also displays information about the generic method definition and the constructed method. When displaying information about the type parameters of the generic method definition, in the DisplayGenericMethodInfo method, the example code shows the value of the DeclaringMethod property for the method's generic type parameter.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2