SafeArraySubType Field

MarshalAsAttribute.SafeArraySubType Field


Indicates the element type of the UnmanagedType.SafeArray.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

public VarEnum SafeArraySubType

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.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft