Bridge

List<(Of <(<'T>)>)>..::..BinarySearch Method (T)

Searches the entire sorted List<(Of <(<'T>)>)> for an element using the default comparer and returns the zero-based index of the element.

Namespace:  System.Collections.Generic
Assembly:  Bridge (in Bridge.dll)

Syntax


public int BinarySearch(
	T value
)
Public Function BinarySearch ( _
	value As T _
) As Integer
public:
int^ BinarySearch(
	T value
)

Parameters

value
Type: T

Return Value

The zero-based index of item in the sorted List<(Of <(<'T>)>)>, if item is found; otherwise, a negative number that is the bitwise complement of the index of the next element that is larger than item or, if there is no larger element, the bitwise complement of Count.

Exceptions


ExceptionCondition
System..::..InvalidOperationExceptionThe default comparer Default cannot find an implementation of the IComparable<(Of <(<'T>)>)> generic interface or the IComparable interface for type T.