Bewerken

Share via


StructLayoutAttribute Constructors

Definition

Initializes a new instance of the StructLayoutAttribute class.

Overloads

StructLayoutAttribute(Int16)

Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

StructLayoutAttribute(LayoutKind)

Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

StructLayoutAttribute(Int16)

Source:
StructLayoutAttribute.cs
Source:
StructLayoutAttribute.cs
Source:
StructLayoutAttribute.cs

Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

public:
 StructLayoutAttribute(short layoutKind);
public StructLayoutAttribute (short layoutKind);
new System.Runtime.InteropServices.StructLayoutAttribute : int16 -> System.Runtime.InteropServices.StructLayoutAttribute
Public Sub New (layoutKind As Short)

Parameters

layoutKind
Int16

A 16-bit integer that represents one of the LayoutKind values that specifies how the class or structure should be arranged.

Remarks

This constructor takes an underlying 16-bit integer that represents each LayoutKind enumeration member. Tlbimp.exe (Type Library Importer) uses this constructor.

See also

Applies to

StructLayoutAttribute(LayoutKind)

Source:
StructLayoutAttribute.cs
Source:
StructLayoutAttribute.cs
Source:
StructLayoutAttribute.cs

Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

public:
 StructLayoutAttribute(System::Runtime::InteropServices::LayoutKind layoutKind);
public StructLayoutAttribute (System.Runtime.InteropServices.LayoutKind layoutKind);
new System.Runtime.InteropServices.StructLayoutAttribute : System.Runtime.InteropServices.LayoutKind -> System.Runtime.InteropServices.StructLayoutAttribute
Public Sub New (layoutKind As LayoutKind)

Parameters

layoutKind
LayoutKind

One of the enumeration values that specifies how the class or structure should be arranged.

Remarks

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

See also

Applies to