StructLayoutAttribute 建構函式

定義

初始化 StructLayoutAttribute 類別的新執行個體。

多載

名稱 Description
StructLayoutAttribute(Int16)

初始化一個新的類別實例 StructLayoutAttribute ,並使用指定的 LayoutKind 列舉成員。

StructLayoutAttribute(LayoutKind)

初始化一個新的類別實例 StructLayoutAttribute ,並使用指定的 LayoutKind 列舉成員。

StructLayoutAttribute(Int16)

來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs

初始化一個新的類別實例 StructLayoutAttribute ,並使用指定的 LayoutKind 列舉成員。

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

一個 16 位元整數,代表 LayoutKind 指定類別或結構應如何排列的值之一。

備註

此建構子取一個底層 16 位元整數,代表每個 LayoutKind 枚舉成員。 Tlbimp.exe(型別函式庫匯入器) 使用此建構子。

另請參閱

適用於

StructLayoutAttribute(LayoutKind)

來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs
來源:
StructLayoutAttribute.cs

初始化一個新的類別實例 StructLayoutAttribute ,並使用指定的 LayoutKind 列舉成員。

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)

參數

layoutKind
LayoutKind

其中一個列舉值,用來指定類別或結構的排列方式。

備註

對於較不易出錯且易讀的程式碼,請始終使用此構造子。

另請參閱

適用於