title: IComparer problem
body: <p>Purpose: To have multiple options to sort using properties of my class . 
  I managed to sort using samAccountName using Comparable but failed to correctly implement IComparer. But know I am getting an error specified below.</p>
  
  <p><em>Error:Does not implement interface member System.Collections.Icomparer</em></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Collections;
  
  namespace ActiveDirectory
  {
      public class sortLastName : IComparer
      {
          int IComparer.CompareTo(Employee oEmployee, Employee oEmployee2)
          {
              return String.Compare(oEmployee.lastName, oEmployee2.lastName);
          }
          public static IComparer sortYearAscending()
          {
              return (IComparer)new sortLastName();
          }
  
      }
  //The code works great when I make a call like 
  // List&lt;Employee&gt; x = new List&lt;Employee&gt;();
  // x.sort();// sorts by samAccountName
  // Now I would like to figure out how to sort by lastName and still be able to sort by 
  //samAccountName if necceaary. 
      public class Employee :IComparable
      {
          //default sort order
          public int CompareTo(object oEmployee)
          {
              Employee emp1 = (Employee)oEmployee;
              return String.Compare(this.samAccountName, emp1.samAccountName);
          }
  
  
  
          public string lastName
          {
              get;
              set;
  
          }
  
            public string samAccountName
          {
              get;
              set;
          }
      }
  }
  </code></pre>