MarshalAsAttribute.SafeArraySubType Field

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Indicates the element type of the UnmanagedType.SafeArray.

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

Public SafeArraySubType As 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.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: