Convert.ToBoolean (SByte) converts 8-bit signed integer to Boolean value.
Class Sample
Public Shared Sub Main()
Dim numbers() As SByte = { SByte.MinValue, -1, 0, 10, 100, SByte.MaxValue }
Dim result As Boolean
For Each number As SByte In numbers
result = Convert.ToBoolean(number)
Console.WriteLine("{0,-5} --> {1}", number, result)
Next
End Sub
End Class
Related examples in the same category