[]
Searches a range of elements in the sorted ReadOnlyStructList<T> for an element using the specified StructComparison<T> and returns the zero-based index of the element.
public int BinarySearch(int index, int count, in T item, StructComparison<T> comparison)
Public Function BinarySearch(index As Integer, count As Integer, ByRef item As T, comparison As StructComparison(Of T)) As Integer
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range to search. |
int | count | The length of the range to search. |
T | item | The object to locate. |
StructComparison<T> | comparison | The StructComparison<T> to use when comparing elements. |
Type | Description |
---|---|
int | The zero-based index of |
Searches a range of elements in the sorted ReadOnlyStructList<T> for an element using the specified comparer and returns the zero-based index of the element.
public int BinarySearch(int index, int count, in T item, IStructComparer<T> comparer)
Public Function BinarySearch(index As Integer, count As Integer, ByRef item As T, comparer As IStructComparer(Of T)) As Integer
Type | Name | Description |
---|---|---|
int | index | The zero-based starting index of the range to search. |
int | count | The length of the range to search. |
T | item | The object to locate. |
IStructComparer<T> | comparer | The IStructComparer<T> implementation to use when comparing elements. |
Type | Description |
---|---|
int | The zero-based index of |