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