This documentation is archived and is not being maintained.

StructLayoutAttribute Constructor (LayoutKind)

.NET Framework 1.1

Initalizes a new instance of the StructLayoutAttribute class with the specified System.Runtime.InteropServices.LayoutKind enumeration member.

[Visual Basic]
Public Sub New( _
   ByVal layoutKind As LayoutKind _
public StructLayoutAttribute(
   LayoutKind layoutKind
public: StructLayoutAttribute(
   LayoutKind layoutKind
public function StructLayoutAttribute(
   layoutKind : LayoutKind


One of the LayoutKind values that specifes how the class or structure should be arranged.


For readable code that is less prone to error, always use this constructor.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

StructLayoutAttribute Class | StructLayoutAttribute Members | System.Runtime.InteropServices Namespace | StructLayoutAttribute Constructor Overload List | LayoutKind