Converts this instance to a Decimal value
[Visual Basic] Overridable Public Function ToDecimal() As Decimal [C#] public virtual Decimal ToDecimal(); [C++] public: virtual Decimal ToDecimal(); [JScript] public function ToDecimal() : Decimal;
The Decimal value for this instance.
Exception Type | Condition |
---|---|
InvalidCastException | If this DateTime is not a decimal value. |
The ToDecimal method casts this DateTime instance into a decimal value. An exception is thrown if this instance cannot be coerced into the decimal.
DateTime Structure | DateTime Members | System Namespace | Decimal