ConvertToSingle Method (Double) |
Converts the value of the specified double-precision floating-point number to an equivalent single-precision floating-point number.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static float ToSingle(
double value
)
Parameters
- value
- Type: SystemDouble
The double-precision floating-point number to convert.
Return Value
Type:
SingleA single-precision floating-point number that is equivalent to
value.
value is rounded using rounding to nearest. For example, when rounded to two decimals, the value 2.345 becomes 2.34 and the value 2.355 becomes 2.36.
See Also