CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums


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

Namespace: ?System.Collections
Assembly: ?mscorlib (in mscorlib.dll)

Syntax

Visual Basic (Declaration)
Function Compare ( _
	x As Object, _
	y As Object _
) As Integer
C#
int Compare(
	Object x,
	Object y
)
Visual C++
int Compare(
	Object^ x, 
	Object^ y
)
JavaScript
function compare(x, y);

Parameters

x
Type: System..::.Object
The first object to compare.
y
Type: System..::.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
System..::.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.

See Also



Free Download:
   
  Privacy | Contact Us
All Times Are GMT