Click or drag to resize

JCOBridgeDirectBufferTAsWritableSpanFromIndex Method

Returns a zero-copy writable SpanT over the buffer starting at the specified element index.

Contract: if any element is modified through the returned span, FlushOnDispose MUST be called before Dispose to ensure changes are written back. Failing to do so results in silent data loss. For single or sparse writes prefer Write(...), which sets the flush flag automatically.


Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
Syntax
public Span<T> AsWritableSpanFromIndex(
	int fromIndex
)

Parameters

fromIndex  Int32
Zero-based index of the first element to include in the span.

Return Value

SpanT
A SpanT covering all elements from fromIndex to the end of the buffer, backed directly by the native memory buffer.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException Thrown when fromIndex is negative or greater than or equal to the element count.
NotSupportedException Thrown when the number of remaining elements exceeds MaxValue.
See Also