List<T>.BinarySearch Method

Uses a binary search algorithm to locate a specific element in the sorted List<T> 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.

  NameDescription
Public method Supported by the .NET Compact Framework Supported by the XNA Framework BinarySearch(T) Searches the entire sorted List<T> for an element using the default comparer and returns the zero-based index of the element.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework BinarySearch(T, IComparer<T>) Searches the entire sorted List<T> for an element using the specified comparer and returns the zero-based index of the element.
Public method Supported by the .NET Compact Framework Supported by the XNA Framework BinarySearch(Int32, Int32, T, IComparer<T>) Searches a range of elements in the sorted List<T> for an element using the specified comparer and returns the zero-based index of the element.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft