Simple question - given an IList how do you perform a binary search without writing the method yourself and without copying the data to a type with bui
If you can use .NET 3.5, you can use the build in Linq extension methods:
using System.Linq;
IList ls = ...;
var orderedList = ls.OrderBy(x => x).ToList();
orderedList.BinarySearch(...);
However, this is really just a slightly different way of going about Andrew Hare's solution, and is only really helpful if you are searching multiple times off of the same ordered list.