Type.IsTypeDefinition 属性


获取一个值,该值指示类型是否是类型定义。Gets a value that indicates whether the type is a type definition.

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


true 当前 Type 是否为类型定义,则为;否则,falsetrue if the current Type is a type definition; otherwise, false.


如果 Type 实例表示直接在程序集中定义的类型,则为类型定义,与根据其他类型按需构造的类型不同。A Type instance is a type definition if it represents the type directly defined in assembly, in contrast to types that are constructed on demand based on other types. 例如,基元类型、类、结构或泛型类型定义是类型定义,但数组、引用、指针或实例化泛型类型不是。For example, a primitive type, class, structure, or generic type definition is a type definition, but an array, reference, pointer, or instantiated generic type isn't.