IComparer interface, compare many objects not just two instances
<p>I'm following examples Apress pro c# framework and I have question on IComparer interface
If I want to create some custom comparer which will compare my objects by name I should implement IComparer interface so I have following</p>

<pre><code>public class CarNameComparer : IComparer
    {
        int IComparer.Compare(object obj1, object obj2)
        {
            Car temp1 = obj1 as Car;
            Car temp2 = obj2 as Car;
            if (temp1 != null &amp;&amp; temp2 != null)
            {
                return String.Compare(temp1.Name, temp2.Name);                
            }
            else
            {
                throw new ArgumentException("Parameter is not a Car");
            }
        }
    }
</code></pre>

<p>And I'm calling to compare like this</p>

<pre><code>Array.Sort(italianCars, new CarNameComparer());
</code></pre>

<p>Which is fine, but this approach is comparing only two instances, as far as I can see this is a limited usage. What if I want to compare bunch of objects, not just two of them ?</p>
