ModuleBuilder.DefineUninitializedData(String, Int32, FieldAttributes) 方法

定義

在可攜式執行檔 (PE) 的 .sdata 區段中定義未初始化的資料欄位。

public:
 System::Reflection::Emit::FieldBuilder ^ DefineUninitializedData(System::String ^ name, int size, System::Reflection::FieldAttributes attributes);
public System.Reflection.Emit.FieldBuilder DefineUninitializedData (string name, int size, System.Reflection.FieldAttributes attributes);
member this.DefineUninitializedData : string * int * System.Reflection.FieldAttributes -> System.Reflection.Emit.FieldBuilder
Public Function DefineUninitializedData (name As String, size As Integer, attributes As FieldAttributes) As FieldBuilder

參數

name
String

用來參考資料的名稱。 name 不能包含內嵌的 null。

size
Int32

資料欄位的大小。

attributes
FieldAttributes

欄位的屬性。

傳回

要參考資料的欄位。

例外狀況

name 的長度為零。

-或-

size 小於或等於零,或者大於或等於 0x003f0000。

namenull

備註

Static 會自動包含在中 attributes

除非呼叫 方法,否則 CreateGlobalFunctions 不會建立這個方法所定義的數據。

注意

從 .NET Framework 2.0 Service Pack 1 開始,此成員不再需要 ReflectionPermissionReflectionPermissionFlag.ReflectionEmit標。 (請參閱反映發出中的安全性問題.) 若要使用此功能,您的應用程式應以 .NET Framework 3.5 或更新版本為目標。

適用於