System.Reflection.Emit.FieldBuilder.SetMarshal Method

Describes the native marshaling of the field.

Syntax

[System.Obsolete("An alternate API is available: Emit the MarshalAs custom attribute instead.")]
public void SetMarshal (UnmanagedMarshal unmanagedMarshal)

Parameters

unmanagedMarshal
A descriptor specifying the native marshalling of this field.

Remarks

The following code sample illustrates the use of SetMarshal.

code reference: FieldBuilder_SetOffset#1

Requirements

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