System.Runtime.InteropServices.FieldOffsetAttribute Class

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

See Also: FieldOffsetAttribute Members


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


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.


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