Gets a value that indicates whether a generic method contains unassigned generic type parameters.
true if the current method contains unassigned generic type parameters; otherwise false.
The default behavior, when not overridden in a derived class, is to return false. In other words, by default, derived classes do not support generics.
In order to invoke a generic method, there must be no generic type definitions or open constructed types in the type arguments of the method itself, or in any enclosing types. If the MethodBase.ContainsGenericParameters property returns true, the method cannot be invoked.
The MethodBase.ContainsGenericParameters property searches recursively for type parameters. For example, it returns true for any method in an open type A<T>, even though the method itself is not generic. Contrast this with the behavior of the MethodBase.IsGenericMethod property, which returns false for such a method.
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.
Operation
This property is read-only.
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0