Type.TypeInitializer 屬性

定義

取得類型的初始設定式。

public:
 property System::Reflection::ConstructorInfo ^ TypeInitializer { System::Reflection::ConstructorInfo ^ get(); };
public System.Reflection.ConstructorInfo? TypeInitializer { get; }
public System.Reflection.ConstructorInfo TypeInitializer { get; }
[System.Runtime.InteropServices.ComVisible(true)]
public System.Reflection.ConstructorInfo TypeInitializer { get; }
member this.TypeInitializer : System.Reflection.ConstructorInfo
[<System.Runtime.InteropServices.ComVisible(true)>]
member this.TypeInitializer : System.Reflection.ConstructorInfo
Public ReadOnly Property TypeInitializer As ConstructorInfo

屬性值

ConstructorInfo

物件,包含 Type 的類別建構函式名稱。

實作

屬性

備註

類別初始化運算式也可透過 FindMembers 方法取得,或透過 GetMember GetMembers GetConstructor GetConstructors 採用做 BindingFlags 為參數的、、和方法的多載來使用。

如果目前 Type 表示泛型型別或泛型方法定義中的類型參數,則這個屬性會傳回 null

適用於

另請參閱