System.Reflection.Emit.ModuleBuilder.DefineUninitializedData Method

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

Syntax

public FieldBuilder DefineUninitializedData (string name, int size, System.Reflection.FieldAttributes attributes)

Parameters

name
The name used to refer to the data. name cannot contain embedded nulls.
size
The size of the data field.
attributes
The attributes for the field.

Returns

A field to reference the data.

Remarks

System.Reflection.FieldAttributes.Static is automatically included in attributes.

The data defined by this method is not created until the ModuleBuilder.CreateGlobalFunctions method is called.

Note:

Starting with the net_v20sp1_long, this member no longer requires System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the net_v35_long or later.

Requirements

Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0