System::TimeSpan::CompareTo 方法

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

比较当前对象和指定对象。

int System::TimeSpan::CompareTo(const SharedPtr<Object> &obj) const
参数类型描述
objconst SharedPtr<Object>&用于与当前对象比较的 TimeSpan 对象

ReturnValue

-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(TimeSpan) const method

比较当前对象和指定对象。

int System::TimeSpan::CompareTo(TimeSpan value) const
参数类型描述
valueTimeSpan用于与当前对象比较的 TimeSpan 对象

ReturnValue

-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

另见