MarshalAsAttribute.SafeArraySubType MarshalAsAttribute.SafeArraySubType MarshalAsAttribute.SafeArraySubType MarshalAsAttribute.SafeArraySubType Field

定义

指示 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 

字段值

注解

可以将此字段设置为从值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有关intCOM 中的数组是VT_I4For example, the SafeArraySubType for an int array in COM is VT_I4. 有关其他信息,请参阅默认封送处理数组For additional information, see Default Marshaling for Arrays.

适用于

另请参阅