TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) TypeBuilder.DefineInitializedData(String, Byte[], FieldAttributes) Method

Definition

Defines initialized data field in the .sdata section of the portable executable (PE) file.

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

Parameters

name
String String String String

The name used to refer to the data. name cannot contain embedded nulls.

data
Byte[]

The blob of data.

attributes
FieldAttributes FieldAttributes FieldAttributes FieldAttributes

The attributes for the field.

Returns

A field to reference the data.

Exceptions

Length of name is zero.

-or-

The size of the data is less than or equal to zero, or greater than or equal to 0x3f0000.

Remarks

The field that you create with this method will be static, even if you do not include FieldAttributes.Static in the attributes parameter.

Applies to