Objects.CheckIndex(Int32, Int32) Method

Definition

Checks if the index is within the bounds of the range from 0 (inclusive) to length (exclusive).

[Android.Runtime.Register("checkIndex", "(II)I", "", ApiSince=30)]
public static int CheckIndex (int index, int length);
[<Android.Runtime.Register("checkIndex", "(II)I", "", ApiSince=30)>]
static member CheckIndex : int * int -> int

Parameters

index
Int32

the index

length
Int32

the upper-bound (exclusive) of the range

Returns

Int32

index if it is within bounds of the range

Attributes

Remarks

Java documentation for java.util.Objects.checkIndex(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to