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.
Calculate the start offset and length of 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. length has to be a positive value.
Returns
ValueTuple<nativeint,nativeint>
Remarks
For performance reason, we don't validate the input length parameter against negative values. It is expected NRange will be used with collections which always have non negative length/count. We validate the NRange is inside the length scope though.