MethodBase.IsGenericMethodDefinition 属性

定义

获取一个值,该值指示方法是否为泛型方法定义。Gets a value indicating whether the method is a generic method definition.

public:
 virtual property bool IsGenericMethodDefinition { bool get(); };
public virtual bool IsGenericMethodDefinition { get; }
member this.IsGenericMethodDefinition : bool
Public Overridable ReadOnly Property IsGenericMethodDefinition As Boolean

属性值

如果当前 true 对象表示泛型方法的定义,则为 MethodBase;否则为 falsetrue if the current MethodBase object represents the definition of a generic method; otherwise, false.

注解

如果当前 MethodBase 表示泛型方法定义,则:If the current MethodBase represents a generic method definition, then:

备注

默认情况下不支持泛型;如果未在派生类中重写,此属性将返回 falseGenerics are not supported by default; this property returns false if not overridden in a derived class. .NET Framework 版本2.0 中不支持泛型构造函数,因此,如果当前实例的类型为 ConstructorInfo,则此属性将返回 falseGeneric constructors are not supported in the .NET Framework version 2.0, so this property returns false if the current instance is of type ConstructorInfo.

有关特定于泛型方法的术语的固定条件列表,请参阅 IsGenericMethod 属性。For a list of the invariant conditions for terms specific to generic methods, see the IsGenericMethod property. 有关泛型反射中使用的其他术语的固定条件列表,请参阅 Type.IsGenericType 属性。For a list of the invariant conditions for other terms used in generic reflection, see the Type.IsGenericType property.

适用于

另请参阅