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