TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) Método
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Define o campo de dados inicializado na seção .sdata do arquivo PE (executável portátil).
public:
System::Reflection::Emit::FieldBuilder ^ DefineInitializedData(System::String ^ name, cli::array <System::Byte> ^ data, System::Reflection::FieldAttributes attributes);
public System.Reflection.Emit.FieldBuilder DefineInitializedData(string name, byte[] data, System.Reflection.FieldAttributes attributes);
member this.DefineInitializedData : string * byte[] * System.Reflection.FieldAttributes -> System.Reflection.Emit.FieldBuilder
Public Function DefineInitializedData (name As String, data As Byte(), attributes As FieldAttributes) As FieldBuilder
- name
- String
O nome usado para fazer referência aos dados.
name
não pode conter nulos inseridos.
- data
- Byte[]
O blob de dados.
- attributes
- FieldAttributes
Os atributos do campo.
Um campo para fazer referência aos dados.
O tamanho de name
é zero.
- ou -
O tamanho dos dados é menor que ou igual a zero, ou maior que ou igual a 0x3f0000.
name
ou data
é null
.
CreateType() foi chamado anteriormente.
O campo criado com esse método será static
, mesmo que você não inclua FieldAttributes.Static
no attributes
parâmetro .
Produto | Versões |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: