Skip to main content

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.v24.1.Core.dll

NuGet Package: DevExpress.SpellChecker.Core

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