TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) メソッド

定義

ポータブル実行可能ファイル (PE) ファイルの .sdata セクションで初期化されたデータ フィールドを定義します。

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

データを参照するために使用される名前。 name 埋め込み null を含めることはできません。

data
Byte[]

データの BLOB。

attributes
FieldAttributes

フィールドの属性。

返品

データを参照するフィールド。

例外

nameの長さは 0 です。

-または-

データのサイズが 0 以下であるか、0x3f0000以上です。

name または datanull

CreateType() は以前に呼び出されています。

注釈

attributes パラメーターにFieldAttributes.Staticを含めなくても、このメソッドで作成したフィールドはstaticされます。

適用対象