This documentation is archived and is not being maintained.

MarshalAsAttribute.SafeArraySubType Field

Indicates the element type of the UnmanagedType.SafeArray.

[Visual Basic]
Public SafeArraySubType As VarEnum
public VarEnum SafeArraySubType;
public: VarEnum SafeArraySubType;
public var SafeArraySubType : 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. For example, the SafeArraySubType for an int array in COM is VT_I4. For additional information, see Default Marshaling for Arrays.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

MarshalAsAttribute Class | MarshalAsAttribute Members | System.Runtime.InteropServices Namespace | SafeArray | VarEnum