MarshalAsAttribute.ArraySubType 字段

定义

指定非托管 LPArrayByValArray 的元素类型。Specifies the element type of the unmanaged LPArray or ByValArray.

public: System::Runtime::InteropServices::UnmanagedType ArraySubType;
public System.Runtime.InteropServices.UnmanagedType ArraySubType;
val mutable ArraySubType : System.Runtime.InteropServices.UnmanagedType
Public ArraySubType As UnmanagedType 

字段值

注解

可以将此参数设置为 System.Runtime.InteropServices.UnmanagedType 枚举中的一个值,以指定数组元素的类型。You can set this parameter to a value from the System.Runtime.InteropServices.UnmanagedType enumeration to specify the type of the array's elements. 如果未指定类型,则使用与托管数组的元素类型相对应的默认非托管类型。If a type is not specified, the default unmanaged type corresponding to the managed array's element type is used. 例如,COM 中 LPWStr 数组的 ArraySubType UnmanagedType.LPWStrFor example, the ArraySubType for a LPWStr array in COM is UnmanagedType.LPWStr. 有关其他信息,请参阅数组的默认封送处理For additional information, see Default Marshaling for Arrays.

适用于

另请参阅