Table of Contents

HasIndex Method

Definition

Namespace
Cuemon.Extensions.Collections.Generic
Assemblies
Cuemon.Extensions.Collections.Generic.dll
Source
src/Cuemon.Extensions.Collections.Generic/ListExtensions.cs

HasIndex<T>(IList<T>, int)

Determines whether the list of the IList<T> is within the range of the index.

public static bool HasIndex<T>(this IList<T> list, int index)

Parameters

list IList<T>

The IList<T> to extend.

index int

The index to find.

Returns

bool

true if the specified index is within the range of the list; otherwise, false.

Type Parameters

T

The type of elements in the IList<T>.

Exceptions

ArgumentNullException

list is null.