Array.BinarySearch Method

Searches a one-dimensional sorted Array for a value, using a binary search algorithm.

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

  Name Description
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch<T>(T[], T) Searches an entire one-dimensional sorted array for a specific element, using the IComparable<T> generic interface implemented by each element of the Array and by the specified object.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch(Array, Object) Searches an entire one-dimensional sorted array for a specific element, using the IComparable interface implemented by each element of the array and by the specified object.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch<T>(T[], T, IComparer<T>) Searches an entire one-dimensional sorted array for a value using the specified IComparer<T> generic interface.
Public method Static member Supported by Portable Class Library BinarySearch(Array, Object, IComparer) Searches an entire one-dimensional sorted array for a value using the specified IComparer interface.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch<T>(T[], Int32, Int32, T) Searches a range of elements in a one-dimensional sorted array for a value, using the IComparable<T> generic interface implemented by each element of the Array and by the specified value.
Public method Static member Supported by Portable Class Library BinarySearch(Array, Int32, Int32, Object) Searches a range of elements in a one-dimensional sorted array for a value, using the IComparable interface implemented by each element of the array and by the specified value.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch<T>(T[], Int32, Int32, T, IComparer<T>) Searches a range of elements in a one-dimensional sorted array for a value, using the specified IComparer<T> generic interface.
Public method Static member Supported by the XNA Framework Supported by Portable Class Library BinarySearch(Array, Int32, Int32, Object, IComparer) Searches a range of elements in a one-dimensional sorted array for a value, using the specified IComparer interface.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft