StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute StructLayoutAttribute Constructors

定义

重载

StructLayoutAttribute(Int16) StructLayoutAttribute(Int16) StructLayoutAttribute(Int16) StructLayoutAttribute(Int16)

使用指定的 LayoutKind 枚举成员初始化 StructLayoutAttribute 类的新实例。Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

StructLayoutAttribute(LayoutKind) StructLayoutAttribute(LayoutKind) StructLayoutAttribute(LayoutKind)

使用指定的 LayoutKind 枚举成员初始化 StructLayoutAttribute 类的新实例。Initializes a new instance of the StructLayoutAttribute class with the specified LayoutKind enumeration member.

StructLayoutAttribute(Int16) StructLayoutAttribute(Int16) StructLayoutAttribute(Int16) StructLayoutAttribute(Int16)

使用指定的 LayoutKind 枚举成员初始化 StructLayoutAttribute 类的新实例。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)

参数

layoutKind
Int16 Int16 Int16 Int16

表示一个 LayoutKind 值的 16 位整数,指定应如何排列类或结构。A 16-bit integer that represents one of the LayoutKind values that specifies how the class or structure should be arranged.

注解

此构造函数采用表示每个LayoutKind枚举成员的基础16位整数。This constructor takes an underlying 16-bit integer that represents each LayoutKind enumeration member. Tlbimp.exe (类型库导入程序)使用此构造函数。The Tlbimp.exe (Type Library Importer) uses this constructor.

另请参阅

StructLayoutAttribute(LayoutKind) StructLayoutAttribute(LayoutKind) StructLayoutAttribute(LayoutKind)

使用指定的 LayoutKind 枚举成员初始化 StructLayoutAttribute 类的新实例。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

参数

layoutKind
LayoutKind LayoutKind LayoutKind LayoutKind

一个枚举值,指定应如何排列类或结构。One of the enumeration values that specifies how the class or structure should be arranged.

注解

对于不容易出错的可读代码, 请始终使用此构造函数。For readable code that is less prone to error, always use this constructor.

另请参阅

适用于