Type.TypeInitializer Свойство

Определение

Возвращает инициализатор для типа.

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

Значение свойства

Объект, содержащий имя конструктора класса для объекта Type.

Реализации

Атрибуты

Комментарии

Инициализаторы классов также доступны через FindMembers метод или через перегрузки , GetMemberGetMembersа также GetConstructor методыGetConstructors, которые принимают BindingFlags в качестве параметра.

Если текущий Type представляет параметр типа в определении универсального типа или универсального метода, это свойство возвращается null.

Применяется к

См. также раздел