System::TimeSpan::Compare 方法

TimeSpan::Compare method

比较两个 TimeSpan 对象。

static constexpr int System::TimeSpan::Compare(TimeSpan t1, TimeSpan t2)
参数类型描述
t1TimeSpan第一个比较数
t2TimeSpan第二个比较数

ReturnValue

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

另见