Share via


TypeBuilder.DefineFieldCore Metodo

Definizione

Quando sottoposto a override in una classe derivata, aggiunge un nuovo campo al tipo, con il nome, gli attributi, il tipo di campo e i modificatori personalizzati.

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

Parametri

fieldName
String

Nome del campo. fieldName non può contenere valori Null incorporati.

type
Type

Tipo del campo.

requiredCustomModifiers
Type[]

Matrice di tipi che rappresentano i modificatori personalizzati necessari per il campo.

optionalCustomModifiers
Type[]

Matrice di tipi che rappresentano i modificatori personalizzati facoltativi per il campo.

attributes
FieldAttributes

Combinazione bit per bit dei valori di enumerazione che specifica gli attributi del campo.

Restituisce

Campo definito.

Si applica a