TypeBuilder.DefineFieldCore Метод

Определение

При переопределении в производном классе добавляет в тип новое поле с заданным именем, атрибутами, типом поля и настраиваемыми модификаторами.

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

Параметры

fieldName
String

Имя поля. Параметр fieldName не может содержать внедренные значения NULL.

type
Type

Тип поля.

requiredCustomModifiers
Type[]

Массив типов, представляющих необходимые настраиваемые модификаторы для поля.

optionalCustomModifiers
Type[]

Массив типов, представляющих необязательные настраиваемые модификаторы для поля.

attributes
FieldAttributes

Побитовое сочетание значений перечисления, указывающее атрибуты поля.

Возвращаемое значение

Определенное поле.

Применяется к