System.Runtime.InteropServices.FieldOffsetAttribute Class

Indicates the physical position of fields within the unmanaged representation of a class or structure.

See Also: FieldOffsetAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Field, Inherited=false)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class FieldOffsetAttribute : Attribute

Remarks

You can apply this attribute to fields.

This attribute is used when System.Runtime.InteropServices.StructLayoutAttribute, with LayoutKind.Explicit passed to its constructor, is applied to a class or structure to specify the offset of each non- static or constant member within the unmanaged representation of that class or structure.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Runtime.InteropServices
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0