class Person:IComparer<Person>
{
int age;
public Person(int age)
{
this.age = age;
}
public int Age
{
get { return age; }
}
public int CompareTo(Person p)
{
return 1;
}
}
ArrayList al = new ArrayList();
al.Add(new Person(9));
al.Sort();
it throws an error: failed to compare 2 elements in array
Thanks