Gets a value indicating whether a generic method contains unassigned generic type parameters.
Assembly: mscorlib (in mscorlib.dll)
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. Making this recursive determination can be difficult. For convenience, and to reduce the chance of error, the property provides a standard way to distinguish between closed constructed methods, which can be invoked, and open constructed methods, which cannot. If the property returns true, the method cannot be invoked.
The property searches recursively for type parameters. For example, it returns true for any method in an open type A<T> (A(Of T) in Visual Basic), even though the method itself is not generic. Contrast this with the behavior of the IsGenericMethod property, which returns false for such a method.
For a list of the invariant conditions for terms specific to generic methods, see the IsGenericMethod property. For a list of the invariant conditions for other terms used in generic reflection, see the IsGenericType property.
The following code example uses the property to display a message indicating whether a MethodInfo is an open generic method (that is, whether it has unbound type parameters).
This example is part of a larger example provided for the MakeGenericMethod method.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.