ConvertToDecimal Method (Single) |
Converts the value of the specified single-precision floating-point number to the equivalent decimal number.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static decimal ToDecimal(
float value
)
Parameters
- value
- Type: SystemSingle
The single-precision floating-point number to convert.
Return Value
Type:
DecimalA decimal number that is equivalent to
value.
Exceptions Exception | Condition |
---|
OverflowException | value is greater than MaxValue or less than MinValue. |
See Also