And, Or, Xor and Not Operator : Operator Logic « Language Basics « VB.Net






And, Or, Xor and Not Operator

And, Or, Xor and Not Operator
Imports System

public class MainClass
    Shared Sub Main()

       Dim x As Integer = 5
       Dim y As Integer = 7

       Dim andValue As Boolean
       Dim orValue As Boolean
       Dim xorValue As Boolean
       Dim notValue As Boolean

       andValue = x = 3 And y = 7
       orValue = x = 3 Or y = 7
       xorValue = x = 3 Xor y = 7
       notValue = Not x = 3

       Console.WriteLine("x = 3 And y = 7. {0}", andValue)
       Console.WriteLine("x = 3 Or y = 7. {0}", orValue)
       Console.WriteLine("x = 3 Xor y = 7. {0}", xorValue)
       Console.WriteLine("Not x = 3. {0}", notValue)
    End Sub

End Class



           
       








Related examples in the same category

1.Compare Integer ValueCompare Integer Value
2.Relation operator: less, biggerRelation operator: less, bigger