January 2012
Intermediate to advanced
396 pages
8h 16m
English
This query operator allows the user to search for an item from an IList<T> instance using the binary search algorithm. As you know, a prerequisite for a binary search is that the array must be sorted. The BinarySearch() method takes care of the sorting internally, so you don't have to actually sort the list.
There are three overloads of this generic method:
This overload takes a type of list and item to search for, and an index where the index of the sought item will be stored.
Read now
Unlock full access