title: How to Implement IComparable interface?
body: <p>I am populating an array with instances of a class:</p>
  
  <pre><code>BankAccount[] a;
  . . .
  
  a = new BankAccount[]
  {
      new BankAccount("George Smith", 500m),
      new BankAccount("Sid Zimmerman", 300m)
  };
  </code></pre>
  
  <p>Once I populate this array, I would like to sort it by balance amounts. In order to do that, I would like to be able to check whether each element is sortable using <code>IComparable</code>. <br />
  I need to do this using interfaces. So far I have the following code:</p>
  
  <pre><code>public interface IComparable
  {
      decimal CompareTo(BankAccount obj);
  }
  </code></pre>
  
  <p>But I'm not sure if this is the right solution.  Any advice?</p>