Convert.ToSingle Method (Boolean)

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

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static float ToSingle(
	bool value
)

Parameters

value
Type: System.Boolean
A Boolean value.

Return Value

Type: System.Single
The number 1 if value is true; otherwise, 0.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft