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

屬性值

已建立的類型。 基於執行階段目的,此類型在進行 get 存取時可能為 null,但無法設定為 null

例外狀況

嘗試設定為 null

備註

除非此實體刻意使用 TypeExtension(Type) 簽章建構函式具現化,否則此值將會是 null。 呼叫 時 ProvideValue ,將不會重設這個屬性。 如果您想要表示的 true 類型,您應該一律呼叫 ProvideValue ,而不是檢查這個屬性。

此屬性是針對標記延伸使用方式的一般規則可設定的。 不過,如果您使用 設定 Type,則此標記延伸的目的無關,因為從呼叫傳ProvideValue回相同Type

適用於