TypeBuilder.DefineFieldCore Méthode

Définition

En cas de substitution dans une classe dérivée, ajoute un nouveau champ au type, avec le nom, les attributs, le type de champ et les modificateurs personnalisés donnés.

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

Paramètres

fieldName
String

Nom du champ. fieldName ne peut pas contenir des valeurs Null imbriquées.

type
Type

Type du champ.

requiredCustomModifiers
Type[]

Tableau de types représentant les modificateurs personnalisés requis pour le champ.

optionalCustomModifiers
Type[]

Tableau de types représentant les modificateurs personnalisés facultatifs pour le champ.

attributes
FieldAttributes

Combinaison de bits des valeurs d’énumération qui spécifie les attributs du champ.

Retours

Champ défini.

S’applique à