Convert.ToSByte (Boolean) converts Boolean to 8-bit signed integer.
Module Example
Public Sub Main()
Dim falseFlag As Boolean = False
Dim trueFlag As Boolean = True
Console.WriteLine("{0} converts to {1}.", falseFlag,Convert.ToSByte(falseFlag))
Console.WriteLine("{0} converts to {1}.", trueFlag,Convert.ToSByte(trueFlag))
End Sub
End Module
Related examples in the same category