TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) Metódus

Definíció

Inicializált adatmezőt határoz meg a hordozható végrehajtható (PE) fájl .sdata szakaszában.

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

Paraméterek

name
String

Az adatokra való hivatkozáshoz használt név. name nem tartalmazhat beágyazott null értékeket.

data
Byte[]

Az adatblob.

attributes
FieldAttributes

A mező attribútumai.

Válaszok

Az adatokra hivatkozó mező.

Kivételek

A hossz name nulla.

-vagy-

Az adatok mérete kisebb vagy egyenlő nullánál, vagy nagyobb, mint 0x3f0000.

name vagy data az null.

CreateType() korábban már meghívták.

Megjegyzések

Az ezzel a módszerrel létrehozott mező akkor is az lesz static, ha nem szerepel FieldAttributes.Static a attributes paraméterben.

A következőre érvényes: