MarshalAsAttribute.SafeArraySubType 字段

定义

指示 SafeArray 的元素类型。Indicates the element type of the SafeArray.

public: System::Runtime::InteropServices::VarEnum SafeArraySubType;
public System.Runtime.InteropServices.VarEnum SafeArraySubType;
val mutable SafeArraySubType : System.Runtime.InteropServices.VarEnum
Public SafeArraySubType As VarEnum 

字段值

VarEnum

注解

可以将此字段设置为枚举中的一个值 System.Runtime.InteropServices.VarEnum ,以指定安全数组的元素的类型。You can set this field to a value from the System.Runtime.InteropServices.VarEnum enumeration to specify the type of the safe array's elements. 如果未指定类型,则托管元素类型的默认类型 (如果作为变量传递) 使用。If a type is not specified, the managed element type's default type (if passed as a VARIANT) is used. 例如, SafeArraySubType int COM 中的数组的为 VT_I4For example, the SafeArraySubType for an int array in COM is VT_I4. 有关其他信息,请参阅 数组的默认封送处理For additional information, see Default Marshaling for Arrays.

适用于

另请参阅