Sage Modeling and Simulation Library

SortByAction..::..Compare Method

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

Namespace:  Highpoint.Sage.Resources
Assembly:  Sage4 (in Sage4.dll)

Syntax


public int Compare(
	Object x,
	Object y
)

Parameters

x
Type: Object
The first object to compare.
y
Type: Object
The second object to compare.

Return Value

Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y.

Exceptions


ExceptionCondition
ArgumentExceptionNeither x nor y implements the IComparable interface.-or- x and y are of different types and neither one can handle comparisons with the other.