This documentation is archived and is not being maintained.
DateTime.AddTicks Method
.NET Framework 1.1
Adds the specified number of ticks to the value of this instance.
[Visual Basic] Public Function AddTicks( _ ByVal value As Long _ ) As DateTime [C#] public DateTime AddTicks( long value ); [C++] public: DateTime AddTicks( __int64 value ); [JScript] public function AddTicks( value : long ) : DateTime;
Parameters
- value
- A number of 100-nanosecond ticks. The value parameter can be positive or negative.
Return Value
A DateTime whose value is the sum of the date and time represented by this instance and the time represented by value.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The resulting DateTime is less than MinValue or greater than MaxValue. |
Remarks
This method does not change the value of this DateTime. Instead, a new DateTime is returned whose value is the result of this operation.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard
See Also
DateTime Structure | DateTime Members | System Namespace | Int64 | Ticks
Show: