TypeBuilder.DefineFieldCore Método

Definição

Quando substituído em uma classe derivada, adiciona um novo campo ao tipo, com o nome, os atributos, o tipo de campo e os modificadores personalizados fornecidos.

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

O nome do campo. fieldName não pode conter nulos inseridos.

type
Type

O tipo do campo.

requiredCustomModifiers
Type[]

Uma matriz de tipos que representam os modificadores personalizados necessários para o campo.

optionalCustomModifiers
Type[]

Uma matriz de tipos que representam os modificadores personalizados opcionais para o campo.

attributes
FieldAttributes

Uma combinação bit a bit dos valores de enumeração que especifica os atributos do campo.

Retornos

O campo definido.

Aplica-se a