List<T>.BinarySearch Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Include Protected Members
Include Inherited Members

Include Silverlight Members
Include Silverlight for Windows Phone Members
Include XNA Framework Members

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.

Overload List

  Name Description
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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 methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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 methodSupported by Silverlight for Windows PhoneSupported by Xbox 360 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