[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.PageReportModel.Length.CompareTo

CompareTo Method

CompareTo(object)

Compares the current Length instance to a specified object and returns an indication of their relative values.

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
object obj

An object to compare with the current instance.

Returns
Type Description
int

An int value indicating the relative order of the objects being compared.

Implements
Examples
var length1 = new Length("10in");
var length2 = new Length("5in");
int comparison = length1.CompareTo(length2); // 1

CompareTo(Length)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Declaration
public int CompareTo(Length other)
Parameters
Type Name Description
Length other

An object to compare with this instance.

Returns
Type Description
int

An int value indicating the relative order of the objects being compared.

Less than zeroThis instance is less than other.
ZeroThis instance is equal to other.
Greater than zeroThis instance is greater than other.
Examples
var length1 = new Length("1in");
var length2 = new Length("2in");
int result = length1.CompareTo(length2); // -1