Redigera

Dela via


NRange.GetOffsetAndLength(IntPtr) Method

Definition

Calculates the start offset and length of the NRange object using a collection length.

public:
 ValueTuple<IntPtr, IntPtr> GetOffsetAndLength(IntPtr length);
public(IntPtr Offset, IntPtr Length) GetOffsetAndLength(IntPtr length);
member this.GetOffsetAndLength : nativeint -> ValueTuple<nativeint, nativeint>
Public Function GetOffsetAndLength (length As IntPtr) As ValueTuple(Of IntPtr, IntPtr)

Parameters

length
IntPtr

nativeint

The length of the collection that the NRange will be used with. Must be a positive value.

Returns

ValueTuple<IntPtr,IntPtr>

ValueTuple<nativeint,nativeint>

Remarks

For performance reasons, the input length parameter isn't validated against negative values. It's expected NRange will be used with collections that always have a non-negative length/count. The NRange is validated to be inside the length scope, however.

Applies to