Convert.ToDouble Method (Boolean)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Converts the value of the specified Boolean value to the equivalent double-precision floating point number.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
- Type: System.Boolean
A Boolean value.
The following code sample illustrates the conversion of a Boolean value to a Double one, using ToDouble.
Public Sub ConvertDoubleBool(ByVal doubleVal As Double) Dim boolVal As Boolean 'Double to Boolean conversion cannot overflow. boolVal = System.Convert.ToBoolean(doubleVal) outputBlock.Text &= String.Format("{0} as a Boolean is: {1}.", _ doubleVal, boolVal) & vbCrLf 'Boolean to Double conversion cannot overflow. doubleVal = System.Convert.ToDouble(boolVal) outputBlock.Text &= String.Format("{0} as a Double is: {1}.", _ boolVal, doubleVal) & vbCrLf End Sub
Show: