Convert.ToBoolean(Decimal) converts decimal number to Boolean value.
Class Sample
Public Shared Sub Main()
Dim numbers() As Decimal = { Decimal.MinValue, -100d, 0d, 300d, Decimal.MaxValue }
Dim result As Boolean
For Each number As Decimal In numbers
result = Convert.ToBoolean(number)
Console.WriteLine("{0,-30} --> {1}", number, result)
Next
End Sub
End Class
Related examples in the same category