Converts this instance into an Int64.
[Visual Basic] Overridable Public Function ToInt64() As Long [C#] public virtual long ToInt64(); [C++] public: virtual __int64 ToInt64(); [JScript] public function ToInt64() : long;
The Int64 value for this instance.
Exception Type | Condition |
---|---|
InvalidCastException | If this DateTime is not an Int64 value. |
The ToInt64 method casts this DateTime instance into an Int64 value. An exception is thrown if this instance cannot be coerced into a 64-bit signed integer (long).
DateTime Structure | DateTime Members | System Namespace | Int64 | UInt64