Convert.ToByte Method (Boolean)

July 28, 2014

Converts the value of the specified Boolean value to the equivalent 8-bit unsigned integer.

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

public static byte ToByte(
	bool value
)

Parameters

value
Type: System.Boolean
A Boolean value.

Return Value

Type: System.Byte
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:
© 2014 Microsoft