Boolean value calculation: Or, Xor, And, Not : Boolean « Data Type « VB.Net Tutorial






public class Test
   public Shared Sub Main
        Dim B As Boolean
        B = False Or True
        Console.WriteLine(B)
    
        B = False Xor False
        Console.WriteLine(B)
    
        B = False And True
        Console.WriteLine(B)
    
        B = Not True
        Console.WriteLine(B)
    
   End Sub
End class
True
False
False
False








2.16.Boolean
2.16.1.Define Boolean value and use it in If statement
2.16.2.Boolean value calculation: Or, Xor, And, Not
2.16.3.CBool: convert Integer to Boolean
2.16.4.CBool(0): convert 0 to Boolean