 | IJavaObjectBaseToArray Method |
Returns a .NET array containing a copy of the JVM object data.
When called on an IJavaObject instance that represents a JVM array,
the returned object is an IJavaArray wrapping the underlying JVM array.
When called on an IJavaArray instance, the returned object is a typed
.NET array whose element type depends on the underlying JVM primitive or reference type,
as described in the returns section below.
Namespace: MASES.JCOBridge.C2JBridge.JVMInteropAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
SyntaxFunction ToArray As Object
Return Value
Object
A .NET array containing a copy of the JVM object data. The exact element
type depends on the underlying JVM type:
-
Primitive arrays (e.g. byte[], int[], double[])
are returned as the corresponding .NET primitive array.
-
String arrays are returned as string[].
-
Object arrays are returned as object[], where each element
is an IJavaObject wrapping the corresponding JVM object.
If an element itself represents a JVM array, ToArray can
be called on it recursively to retrieve its content.
See Also