Convert.ToBoolean (UInt32) converts 32-bit unsigned integer to Boolean value.
Class Sample
Public Shared Sub Main()
Dim numbers() As UInteger = { UInt32.MinValue, 1, 2010, Int32.MaxValue }
Dim result As Boolean
For Each number As UInteger In numbers
result = Convert.ToBoolean(number)
Console.WriteLine("{0,-15:N0} --> {1}", number, result)
Next
End Sub
End Class
Related examples in the same category