Skip to main content
.NET Framework Class Library
ListTBinarySearch Method





Uses a binary search algorithm to locate a specific element in the sorted ListT or a portion of it.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List
  NameDescription
Public method BinarySearch(T) Searches the entire sorted ListT for an element using the default comparer and returns the zero-based index of the element.
Public method BinarySearch(T, IComparerT) Searches the entire sorted ListT for an element using the specified comparer and returns the zero-based index of the element.
Public method BinarySearch(Int32, Int32, T, IComparerT) Searches a range of elements in the sorted ListT for an element using the specified comparer and returns the zero-based index of the element.
Top