ImmutableSortedSet<T>.Builder.IndexOf(T) Method

Definition

Searches for the first index within this set that the specified value is contained.

public int IndexOf (T item);

Parameters

item
T

The value to locate within the set.

Returns

The index of the specified item in the sorted set, if item is found. If item is not found and item is less than one or more elements in this set, returns a negative number that is the bitwise complement of the index of the first element that's larger than item. If item is not found and item is greater than any of the elements in the set, returns a negative number that is the bitwise complement of (the index of the last element plus 1).

Applies to

Product Versions
.NET 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)