语言

TypeExtension.Type 属性

定义

获取或设置此扩展的类型信息。

public:
 property Type ^ Type { Type ^ get(); void set(Type ^ value); };
public Type Type { get; set; }
member this.Type : Type with get, set
Public Property Type As Type

属性值

已建立的类型。 出于运行时目的,这可能是 null 为了获取访问权限,但不能设置为 null。

例外

尝试设置为 null.

注解

除非此实例是故意使用 TypeExtension(Type) 签名构造函数实例化的,否则此值将为 null。 调用此属性时 ProvideValue 不会重置。 如果要表示 true 类型,应始终调用 ProvideValue 而不是检查此属性。

此属性根据有关标记扩展用法的常规规则进行设置。 但是,如果使用 a Type设置,则此标记扩展的用途无关紧要,因为调用中返回Type了相同的ProvideValue内容。

适用于