TypeBuilder.DefineFieldCore Metoda

Definicja

Po zastąpieniu w klasie pochodnej dodaje nowe pole do typu z daną nazwą, atrybutami, typem pola i modyfikatorami niestandardowymi.

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

Parametry

fieldName
String

Nazwa pola. fieldName Program nie może zawierać osadzonych wartości null.

type
Type

Typ pola.

requiredCustomModifiers
Type[]

Tablica typów reprezentujących wymagane modyfikatory niestandardowe dla pola.

optionalCustomModifiers
Type[]

Tablica typów reprezentujących opcjonalne modyfikatory niestandardowe dla pola.

attributes
FieldAttributes

Bitowa kombinacja wartości wyliczenia, która określa atrybuty pola.

Zwraca

Zdefiniowane pole.

Dotyczy