Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

TryGetOffsetAndLength

func TryGetOffsetAndLength(length: int) -> Result<(int, int), InvalidRangeError>

Declaring type: Range
Module: System
Assembly: System.Runtime.dll
Source file: Range.rvn

Resolves offset and count, returning InvalidRangeError for invalid bounds or a negative length.

Parameters

Name Type Description
length Int32

Return value

Result<(Offset: Int32, Length: Int32), InvalidRangeError>