Click or drag to resize
ConvertToSingle Method (Decimal)
Converts the value of the specified decimal number to an equivalent single-precision floating-point number.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public static float ToSingle(
	decimal value
)

Parameters

value
Type: SystemDecimal
The decimal number to convert.

Return Value

Type: Single
A 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