TypeBuilder.DefineFieldCore Método

Definición

Cuando se reemplaza en una clase derivada, agrega un nuevo campo al tipo, con el nombre, los atributos, el tipo de campo y los modificadores personalizados especificados.

protected:
 abstract System::Reflection::Emit::FieldBuilder ^ DefineFieldCore(System::String ^ fieldName, Type ^ type, cli::array <Type ^> ^ requiredCustomModifiers, cli::array <Type ^> ^ optionalCustomModifiers, System::Reflection::FieldAttributes attributes);
protected abstract System.Reflection.Emit.FieldBuilder DefineFieldCore (string fieldName, Type type, Type[]? requiredCustomModifiers, Type[]? optionalCustomModifiers, System.Reflection.FieldAttributes attributes);
abstract member DefineFieldCore : string * Type * Type[] * Type[] * System.Reflection.FieldAttributes -> System.Reflection.Emit.FieldBuilder
Protected MustOverride Function DefineFieldCore (fieldName As String, type As Type, requiredCustomModifiers As Type(), optionalCustomModifiers As Type(), attributes As FieldAttributes) As FieldBuilder

Parámetros

fieldName
String

Nombre del campo. fieldName no puede contener valores null insertados.

type
Type

Tipo del campo.

requiredCustomModifiers
Type[]

Matriz de tipos que representa los modificadores personalizados necesarios para el campo.

optionalCustomModifiers
Type[]

Matriz de tipos que representa los modificadores personalizados opcionales para el campo.

attributes
FieldAttributes

Combinación bit a bit de los valores de enumeración que especifica los atributos del campo.

Devoluciones

Campo definido.

Se aplica a