Compare()

TimeSpan::Compare(TimeSpan, TimeSpan) method

Compares two TimeSpan objects.

static constexpr int System::TimeSpan::Compare(TimeSpan t1, TimeSpan t2)

Arguments

ParameterTypeDescription
t1TimeSpanThe first comparand
t2TimeSpanThe second comparand

Return Value

-1 if t1 is shorter than t2; 0 if t1 is equal to t2; 1 if t1 is longer than t2

See Also