Click or drag to resize

IJavaArraySetT(Int32, ReadOnlyMemoryT) Method

Sets the elements in values starting from the position startIndex of the Java array.

Namespace: MASES.JCOBridge.C2JBridge.JVMInterop
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.10.261112-5ffe0920c00dbac056780af7ab9b1978b26ef4a5
Syntax
void Set<T>(
	int startIndex,
	ReadOnlyMemory<T> values
)
where T : struct, new()

Parameters

startIndex  Int32
The zero-based index of the Java array at which the first element is written.
values  ReadOnlyMemoryT
The memory block whose elements are copied into the Java array.

Type Parameters

T
The element type of values. Only the native primitives are supported (bool, byte, char, short, int, long, float, double). The type must match the element type of the Java array.
Exceptions
ExceptionCondition
NotSupportedExceptionThe engine is not an HPA edition, or T is not one of the supported primitive types.
ArgumentOutOfRangeExceptionstartIndex is negative.
InvalidCastExceptionT is not consistent with the element type of the Java array.
NullReferenceExceptionThe Java array is .
IndexOutOfRangeExceptionThe elements do not fit in the Java array starting from startIndex.
Remarks
Supported only on the HPA Edition. The method is part of the public API on every edition so that code can be written once and adapted at runtime: check IsHPAEdition before calling it and use the ArraySegmentT overload otherwise.
See Also