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