VirtualTypeBuilder.FieldInfoCollection.Add Método

Definição

Sobrecargas

Add(FieldInfo)

Adiciona um FieldInfo ao final da coleção.

Add(String, Type)

Adiciona um FieldInfo ao final da coleção.

Add(String, Type, Attribute[])

Adiciona um FieldInfo ao final da coleção.

Add(String, Type, Attribute[], FieldAttributes)

Adiciona um FieldInfo ao final da coleção.

Add(FieldInfo)

Adiciona um FieldInfo ao final da coleção.

public:
 int Add(System::Reflection::FieldInfo ^ value);
public int Add (System.Reflection.FieldInfo value);
member this.Add : System.Reflection.FieldInfo -> int
Public Function Add (value As FieldInfo) As Integer

Parâmetros

value
FieldInfo

O FieldInfo a ser adicionado ao final da coleção.

Retornos

Int32

O índice no qual o valor foi adicionado.

Aplica-se a

Add(String, Type)

Adiciona um FieldInfo ao final da coleção.

public:
 int Add(System::String ^ name, Type ^ fieldType);
public:
 int Add(Platform::String ^ name, Platform::Type ^ fieldType);
public int Add (string name, Type fieldType);
member this.Add : string * Type -> int
Public Function Add (name As String, fieldType As Type) As Integer

Parâmetros

name
String

O nome do campo a ser adicionado.

fieldType
Type

O tipo de campo.

Retornos

Int32

O índice no qual o valor foi adicionado.

Exceções

name ou fieldType é null.

fieldType Não é um tipo de tempo de execução.

Aplica-se a

Add(String, Type, Attribute[])

Adiciona um FieldInfo ao final da coleção.

public:
 int Add(System::String ^ name, Type ^ fieldType, cli::array <Attribute ^> ^ attributes);
public:
 int Add(Platform::String ^ name, Platform::Type ^ fieldType, Platform::Array <Platform::Metadata::Attribute ^> ^ attributes);
public int Add (string name, Type fieldType, Attribute[] attributes);
member this.Add : string * Type * Attribute[] -> int
Public Function Add (name As String, fieldType As Type, attributes As Attribute()) As Integer

Parâmetros

name
String

O nome do campo a ser adicionado.

fieldType
Type

O tipo de campo.

attributes
Attribute[]

Uma matriz de atributos que deve ser Public e/ou Static .

Retornos

Int32

O índice no qual o valor foi adicionado.

Exceções

name ou fieldType um elemento em attributes é null . attributes pode ser null .

fieldType Não é um tipo de tempo de execução.

Aplica-se a

Add(String, Type, Attribute[], FieldAttributes)

Adiciona um FieldInfo ao final da coleção.

public:
 int Add(System::String ^ name, Type ^ fieldType, cli::array <Attribute ^> ^ attributes, System::Reflection::FieldAttributes fieldAttributes);
public int Add (string name, Type fieldType, Attribute[] attributes, System.Reflection.FieldAttributes fieldAttributes);
member this.Add : string * Type * Attribute[] * System.Reflection.FieldAttributes -> int
Public Function Add (name As String, fieldType As Type, attributes As Attribute(), fieldAttributes As FieldAttributes) As Integer

Parâmetros

name
String

O nome do campo a ser adicionado.

fieldType
Type

O tipo de campo.

attributes
Attribute[]

Esse parâmetro é usado para configurar o membro da classe adequadamente. Add(String, Type, Attribute[], FieldAttributes) aceita apenas os valores de MemberAttributes que se encaixam nas AccessMask ScopeMask categorias ou.

fieldAttributes
FieldAttributes

Esse parâmetro especifica atributos de campo adicionais para este membro. O atributo de campo padrão é Public . Os únicos atributos de campo com suporte no momento são Public e Static .

Retornos

Int32

O índice no qual o valor foi adicionado.

Exceções

name ou fieldType um elemento em attributes é null . attributes pode ser null .

fieldType Não é um tipo de tempo de execução-ou-não fieldAttributes contém Public ou contém bits de conjunto diferente de Public e Static , ou os atributos passados por meio do attributes parâmetro não podem ser aplicados a campos.

Aplica-se a