C# UInt64 CompareTo(Object)
Description
UInt64 CompareTo(Object)
compares this instance to
a specified object and returns an indication of their relative values.
Syntax
UInt64.CompareTo(Object)
has the following syntax.
public int CompareTo(
Object value
)
Parameters
UInt64.CompareTo(Object)
has the following parameters.
value
- An object to compare, or null.
Returns
UInt64.CompareTo(Object)
method returns A signed number indicating the relative values of this instance and value.
Return Value Description Less than zero This instance is less than value.
Zero This instance is equal to value. Greater than zero This instance is greater
than value. -or- value is null.
Example
//from ww w. j av a2s. c o m
using System;
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(UInt64.MaxValue.CompareTo((object)UInt64.MinValue));
}
}
The code above generates the following result.