Skip to main content
A newer version of this page is available. .

SuggestionCollection.BinarySearch(SuggestionBase, IComparer<SuggestionBase>) Method

Searches a collection for a specific suggestion, using a binary search algorithm and the specified IComparer interface.

Namespace: DevExpress.XtraSpellChecker

Assembly: DevExpress.SpellChecker.v18.2.Core.dll

Declaration

public int BinarySearch(
    SuggestionBase item,
    IComparer<SuggestionBase> comparer
)

Parameters

Name Type Description
item SuggestionBase

The SuggestionBase object to search for.

comparer IComparer<SuggestionBase>

The IComparer<T> implementation to use when comparing elements.

Returns

Type Description
Int32

The zero-based index of an item in the SuggestionCollection, if the item is found; otherwise, a negative number.

See Also