Compares the current
Length instance to a specified object and returns an indication of their relative values.
'Declaration
Public Overloads Function CompareTo( _
ByVal As Object _
) As Integer
Parameters
- obj
- An System.Object to compare with the current instance.
Return Value
An
System.Int32 value indicating the relative order of the objects being compared.
var length1 = new Length("10in");
var length2 = new Length("5in");
int comparison = length1.CompareTo(length2); // 1