NRange.GetOffsetAndLength(IntPtr) 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.
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<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.