Leer en inglés

Compartir a través de


Type.TypeInitializer Propiedad

Definición

Obtiene el inicializador para el tipo.

C#
public System.Reflection.ConstructorInfo? TypeInitializer { get; }
C#
public System.Reflection.ConstructorInfo TypeInitializer { get; }
C#
[System.Runtime.InteropServices.ComVisible(true)]
public System.Reflection.ConstructorInfo TypeInitializer { get; }

Valor de propiedad

ConstructorInfo

Objeto que contiene el nombre del constructor de clase para Type.

Implementaciones

Atributos

Comentarios

Los inicializadores de clase también están disponibles a través del método o a través de sobrecargas de los métodos , , y que FindMembers GetMember toman como GetMembers GetConstructor GetConstructors BindingFlags parámetro.

Si el objeto actual representa un parámetro de tipo en la definición de un tipo genérico o un método Type genérico, esta propiedad devuelve null .

Se aplica a

Producto Versiones
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8
.NET Standard 2.0, 2.1

Consulte también