Initializes a new instance of the DateTime class to a specified number of Ticks.
[Visual Basic] Overloads Public Sub New( _ ByVal ticks As Long _ ) [C#] public DateTime( long ticks ); [C++] public: DateTime( __int64 ticks ); [JScript] public function DateTime( ticks : long );
Exception Type | Condition |
---|---|
ArgumentException | If ticks is less than DateTime.MinValue or greater than DateTime.MaxValue. |
This DateTime class initializes a new DateTime value that uses the ticks values for MinValue and MaxValue.
DateTime Structure | DateTime Members | System Namespace | DateTime Constructor Overload List | Int64 | Ticks