Поделиться через


Array.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

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.

Overload List

  Name Description
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 BinarySearch<T>(array<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 methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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 methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 BinarySearch<T>(array<T[], T, IComparer<T>) Searches an entire one-dimensional sorted Array for a value using the specified IComparer<T> generic interface.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 BinarySearch<T>(array<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 methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 BinarySearch<T>(array<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 methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360 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

See Also

Reference