title: Binary Search a List of custom data types to match just one field
body: <p>I have a List:</p>
  
  <pre><code>List&lt;Student&gt; allStudents = new List&lt;Student&gt;(); 
  </code></pre>
  
  <p>that contains over 94,000 Student objects, where Student is defined as:</p>
  
  <pre><code>public class Student
  {
      public Int32 ID { get; set; }
      public String Surname { get; set; }
      public String Other_Names { get; set; }
      public String DOB { get; set; }
      // remaining fields omitted
  }
  </code></pre>
  
  <p>and sorted by Surname.</p>
  
  <p>After grabbing a Student object from another source, I want to binary search the List allStudents to find a match based ONLY on the Surname property. For example, if an existing record in the List allStudents is:</p>
  
  <pre><code>Student(8139241, "Flintstone", "Fred", "12/1/1967")
  </code></pre>
  
  <p>and I search for the item:</p>
  
  <pre><code>Student(7294311, "Flintstone", "Wilma", "14/6/1969")
  </code></pre>
  
  <p>the binary search should be a success.</p>
  
  <p>The List.BinarySearch(T, IComparer) overload appears to be a possibility, but is it a viable solution? Or is there a better strategy? I will be dealing a lot of records and searches, so O(n) search functions will not be viable.</p>
  
  <p>Thanks in advance!</p>
  
  <p>UPDATE: I've decided to replace my List with a MultiDictionary from the Wintellect PowerCollections library. This MultiDictionary can accept duplicate keys.</p>