Converts this instance of a Boolean to a Decimal format.
[Visual Basic] Overridable Public Function ToDecimal() As Decimal [C#] public virtual Decimal ToDecimal(); [C++] public: virtual Decimal ToDecimal(); [JScript] public function ToDecimal() : Decimal;
A decimal as a Boolean
Exception Type | Condition |
---|---|
InvalidCastException | If it doesn't return a decimal. |
The ToDecimal method returns a decimal.
This method implements IConvertible, which replaced IValue. This method is used to obtain the type code for a specified object. (See the TypeCode enumeration for more information about type codes and ToDecimal.)
Boolean Structure | Boolean Members | System Namespace | Convert