System::DateTimeOffset::operator- 方法

DateTimeOffset::operator-(const DateTimeOffset&) const method

返回一个 TimeSpan 类的实例,表示当前对象和指定对象所表示的日期时间值之间的时间间隔。

TimeSpan System::DateTimeOffset::operator-(const DateTimeOffset &other) const
参数类型描述
otherconst DateTimeOffset&一个 DateTime 类的实例,标记要计算的区间的一端

ReturnValue

一个 TimeSpan 类的实例,表示当前对象和 other 所表示的日期时间值之间的时间间隔。

另见

DateTimeOffset::operator-(TimeSpan) const method

返回一个新的 DateTimeOffset 类实例,表示从当前对象所表示的值减去指定时间跨度后的日期时间值。

DateTimeOffset System::DateTimeOffset::operator-(TimeSpan value) const
参数类型描述
TimeSpan要减去的时间间隔

ReturnValue

一个新的 DateTimeOffset 类实例,表示从当前对象所表示的值减去 value 后的日期时间值。

另见