public int Compare( object x, object y )
{
if ( x == null && y == null )
return 0;
else if ( x == null )
return -1;
else if ( y == null )
return 1;
PropertyInfo a = x as PropertyInfo;
PropertyInfo b = y as PropertyInfo;
if ( a == null || b == null )
throw new ArgumentException();
return a.Name.CompareTo( b.Name );
}
}