public int CompareTo(object obj)
{
if (obj is ImageSize)
{
ImageSize temp = (ImageSize)obj;
if ((temp.width * temp.height) == (this.width * this.height))
return 0;
if ((temp.width * temp.height) > (this.width * this.height))
return -1;
else
return 1;
}
throw new ArgumentException();
}