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
You are going to have a couple of problems binary-searching an IList, First ,like you mentioned, the BinarySearch method on the List is not a member of the IList interface. Second, you have no way of sorting the list prior to searching (which you must do for a binary search to work).
I think your best bet is to create a new List, sort it, and then search. It's not perfect but you don't have to many options if you have an IList.