Server.Gumps.PropertiesGump.PropertySorter.Compare C# (CSharp) Méthode

Compare() public méthode

public Compare ( object x, object y ) : int
x object
y object
Résultat int
			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 );
			}
		}
PropertiesGump.PropertySorter