BoolExtensions.ToByte(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static byte ToByte (this bool flag);
static member ToByte : bool -> byte
<Extension()>
Public Function ToByte (flag As Boolean) As Byte
Parameters
- flag
- Boolean
The input value to convert.
Returns
1 if flag
is true
, 0 otherwise.
Remarks
This method does not contain branching instructions.