NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

StructLayoutAttribute Class

Typically the runtime controls the physical layout of the data members of class. The StructLayoutAttribute allows the user to control the physical layout of the data members of a class. Explicit control of a classes layout is important if the class is to be passed to unmanaged code that expects a specific layout. The LayoutKind value Sequential is used to force the members to be laid out sequentially in the order they appear. Explicit is used to control the precise position of each data member. With Explicit each member must use the FieldOffsetAttribute to indicate the position of that field within the type.

Object
   Attribute
      StructLayoutAttribute

[Visual Basic]
Public Class StructLayoutAttribute
   Inherits Attribute
[C#]
public class StructLayoutAttribute : Attribute
[C++]
public __gc class StructLayoutAttribute : public Attribute
[JScript]
public class StructLayoutAttribute extends Attribute

Remarks

Can be used to attribute classes or structures.

Requirements

Namespace: System.Runtime.InteropServices

Assembly: mscorlib.dll

See Also

StructLayoutAttribute Members | System.Runtime.InteropServices Namespace