JavaSByteArray.CreateMarshaledValue(IntPtr, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Marshals a JNI primitive-array handle to a managed wrapper or copied array.
public static object? CreateMarshaledValue(IntPtr handle, Type? targetType);
static member CreateMarshaledValue : nativeint * Type -> obj
Parameters
- handle
-
IntPtr
nativeint
A nonzero JNI reference to the Java primitive array. The source reference is not consumed.
- targetType
- Type
The requested supported managed target type. null selects the default managed-array result.
Returns
A wrapper for an explicitly requested wrapper target, or a copied managed array for a supported collection target.
Remarks
Unsupported target types cause NotSupportedException. A null handle is not converted into a successful null result.