Export (0) Print
Expand All

Convert.ToSingle Method (Boolean)

.NET Framework 1.1

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

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


A Boolean value.

Return Value

The number 1 if value is true; otherwise, 0.


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

© 2014 Microsoft