true if the current method is a generic method; otherwise false.
Use the MethodInfo.IsGenericMethod property to determine whether a System.Reflection.MethodInfo object represents a generic method. Use the MethodInfo.ContainsGenericParameters property to determine whether a System.Reflection.MethodInfo object represents an open constructed method or a closed constructed method.
The following table summarizes the invariant conditions for terms specific to generic methods. For other terms used in generic reflection, such as generic type parameter and generic type, see the Type.IsGenericType property.
generic method definition |
The MethodInfo.IsGenericMethodDefinition property is true. Defines a generic method. A constructed method is created by calling the MethodInfo.MakeGenericMethod(Type[]) method on a System.Reflection.MethodInfo object that represents a generic method definition, and specifying an array of type arguments. MethodInfo.MakeGenericMethod(Type[]) can be called only on generic method definitions. Any generic method definition is a generic method, but the converse is not true. |
generic method |
The MethodInfo.IsGenericMethod property is true. Can be a generic method definition, an open constructed method, or a closed constructed method. |
open constructed method |
The MethodInfo.ContainsGenericParameters property is true. It is not possible to invoke an open constructed method. |
closed constructed method |
The MethodInfo.ContainsGenericParameters property is false. When examined recursively, the method has no unassigned generic parameters. The containing type has no generic type parameters, and none of the type arguments have generic type parameters. The method can be invoked. |