I can do the following with Find:
Racer theRacer2 = racers.Find(delegate(Racer racer) { return racer.Car ==
"Ferrari"; });
But I can't seem to do the same with BinarySearch, this:
int iktr = racers.BinarySearch(delegate(Racer racer) { return racer.Car ==
"Ferrari"; });
gives me these errors:
The best overloaded method match for
'System.Collections.Generic.List<Generics.Racer>.B inarySearch(Generics.Racer)'
has some invalid arguments
and
Argument '1': cannot convert from 'anonymous method' to 'Generics.Racer'
Can I make this work with an anonymous method or do I need to create another
function to use BinarySearch?
Thanks,
Tom