This documentation is archived and is not being maintained.

Convert.ToSingle Method (Decimal)

.NET Framework 1.1

Converts the value of the specified Decimal number to an equivalent single-precision floating point number.

[Visual Basic]
Overloads Public Shared Function ToSingle( _
   ByVal value As Decimal _
) As Single
public static float ToSingle(
 decimal value
public: static float ToSingle(
 Decimal value
public static function ToSingle(
   value : Decimal
) : float;


A Decimal number.

Return Value

A single-precision floating point number equivalent to the value of 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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Convert Class | Convert Members | System Namespace | Convert.ToSingle Overload List