DateTime.AddTicks(Int64) DateTime.AddTicks(Int64) DateTime.AddTicks(Int64) DateTime.AddTicks(Int64) Method

定义

返回一个新的 DateTime,它将指定的刻度数加到此实例的值上。Returns a new DateTime that adds the specified number of ticks to the value of this instance.

public:
 DateTime AddTicks(long value);
public DateTime AddTicks (long value);
member this.AddTicks : int64 -> DateTime
Public Function AddTicks (value As Long) As DateTime

参数

value
Int64 Int64 Int64 Int64

以 100 纳秒为单位的计时周期数。A number of 100-nanosecond ticks. value 参数可以是正数也可以是负数。The value parameter can be positive or negative.

返回

一个对象,其值是此实例所表示的日期和时间与 value 所表示的时间之和。An object whose value is the sum of the date and time represented by this instance and the time represented by value.

异常

注解

此方法不更改此DateTime的值。This method does not change the value of this DateTime. 相反, 它会返回一个DateTime新的, 其值为此操作的结果。Instead, it returns a new DateTime whose value is the result of this operation.

适用于

另请参阅