title: How to use BinarySearch for List<T>
body: <p>Let's start with this overload of List BinarySearch:</p>
  
  <pre><code>public int BinarySearch(T item, IComparer&lt;T&gt; comparer);
  </code></pre>
  
  <p>It is well known that the list should be sorted with the appropiate IComparer before using BinarySearch. But then: to search the list you will have to provide a T item. This is rather unexpected when one is used to searching items in the list based on properties of these items (i.e. using Linq or delegates/predicates). Because when I already have my T item I don't have to search it!</p>
  
  <p>Now I was implementing C++ code in C# and saw that the C++ programmer used C++ style binary searches everywhere in his code as follows. First he made a new T item and gave this T item the properties he was looking for. Then he searched the list with it, to find <em>the index of an item in the list with the same properties</em>. The C++ comparer of course was adapted to these properties.</p>
  
  <p>So this is a quite different way to look up items in a List. BinarySearch makes a <em>dummy</em> T item and searches for an index with which it can retrieve the <em>real</em> T item in the list. From a Linq point of view this feels unnatural.</p>
  
  <p>My questions are:</p>
  
  <p>Did I give a correct description of the idea behind BinarySearch?</p>
  
  <p>Do you think it is possible to use a Linq style search with BinarySearch without making a dummy T item first?</p>