CompareTo()

TimeSpan::CompareTo(TimeSpan) const method

Compares current and the specified objects.

constexpr int System::TimeSpan::CompareTo(TimeSpan value) const

Arguments

ParameterTypeDescription
valueTimeSpanThe TimeSpan object to compare the current object with

Return Value

-1 if the current object represents the interval that is shorter than value; 0 if the current object represents the interval that is equal to value; 1 if the current object represents the interval that is longer than value

TimeSpan::CompareTo(const SharedPtr<Object>&) const method

Compares current and the specified objects.

int System::TimeSpan::CompareTo(const SharedPtr<Object> &obj) const

Arguments

ParameterTypeDescription
objconst SharedPtr<Object>&The TimeSpan object to compare the current object with

Return Value

-1 if the current object represents the interval that is shorter than value; 0 if the current object represents the interval that is equal to value; 1 if the current object represents the interval that is longer than value

See Also