MarshalAsAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 MarshalAsAttribute 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| MarshalAsAttribute(Int16) |
使用指定的MarshalAsAttribute值初始化类的新实例UnmanagedType。 |
| MarshalAsAttribute(UnmanagedType) |
使用指定的MarshalAsAttribute枚举成员初始化类的新实例UnmanagedType。 |
MarshalAsAttribute(Int16)
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
使用指定的MarshalAsAttribute值初始化类的新实例UnmanagedType。
public:
MarshalAsAttribute(short unmanagedType);
public MarshalAsAttribute(short unmanagedType);
new System.Runtime.InteropServices.MarshalAsAttribute : int16 -> System.Runtime.InteropServices.MarshalAsAttribute
Public Sub New (unmanagedType As Short)
参数
- unmanagedType
- Int16
数据要封送为的值。
注解
此构造函数采用表示每个 UnmanagedType 枚举成员的基础 16 位有符号整数。 Tlbimp.exe(类型库导入程序)使用此构造函数。
另请参阅
适用于
MarshalAsAttribute(UnmanagedType)
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
- Source:
- MarshalAsAttribute.cs
使用指定的MarshalAsAttribute枚举成员初始化类的新实例UnmanagedType。
public:
MarshalAsAttribute(System::Runtime::InteropServices::UnmanagedType unmanagedType);
public MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType unmanagedType);
new System.Runtime.InteropServices.MarshalAsAttribute : System.Runtime.InteropServices.UnmanagedType -> System.Runtime.InteropServices.MarshalAsAttribute
Public Sub New (unmanagedType As UnmanagedType)
参数
- unmanagedType
- UnmanagedType
数据要封送为的值。
注解
对于容易出错的可读代码,请始终使用此构造函数。