In at least one object must implement the interface IComparable
<pre><code>class Program
{
    public class Pokemon
    {
        public string Name;
        public int Weight;
    }


    public class myReverserClass : IComparer
    {

        // Calls CaseInsensitiveComparer.Compare with the parameters reversed.
        int IComparer.Compare(Object x, Object y)
        {
            return ((new CaseInsensitiveComparer()).Compare(x, y));
        }
    }


    static void Main(string[] args)
    {
        IComparer myComparer = new myReverserClass();

        Random r = new Random();

        string[] pokemons = new string[10];
        pokemons[0] = "Bulbasaur";
        pokemons[1] = "Charmander";
        pokemons[2] = "Squirtle";
        pokemons[3] = "Groulit";
        pokemons[4] = "Caterpie";
        pokemons[5] = "Weedle";
        pokemons[6] = "Kakuna";
        pokemons[7] = "Beedrill";
        pokemons[8] = "Pidgey";
        pokemons[9] = "Rattata";

        string[] sovpad = new string[10];
        Pokemon[] pokemon = new Pokemon[10];

        for (int i = 0; i &lt; pokemons.Length; i++)
        {
            string sovpadtrue;
            sovpadtrue = pokemons[r.Next(0, pokemons.Length)];
            for(int p = 0; p&lt;sovpad.Length;p++)
            {
                if(sovpadtrue == sovpad[p])
                {
                    sovpadtrue = pokemons[r.Next(0, pokemons.Length)];
                    p = -1;
                }
            }
            sovpad[i] = sovpadtrue;
            pokemon[i] = new Pokemon();
            pokemon[i].Name = sovpadtrue;
            pokemon[i].Weight = r.Next(10, 1000);
        }
        Array.Sort(pokemon,myComparer);

        Console.ReadLine();
    }
}
</code></pre>

<p>How to add a class myReverserClass, to sort an array of pokemon, first by name, and then the weight?
Error: In at least one object must implement the interface IComparable.
On Msdn example of one-dimensional array only. And myReverserClass taken from msdn.</p>
