Boolean value with And and Or : Arithmetic Operator « Operator « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Operator » Arithmetic Operator 
3.2.3.Boolean value with And and Or
Option Strict On
 Imports System
 Module Module1

    Sub Main( )

       Dim As Integer = 5
       Dim As Integer = 7

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

       andValue = x = And y = 7
       orValue = x = Or y = 7
       xorValue = x = 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 'Main

 End Module
x = 3 And y = 7. False
x = 3 Or y = 7. True
x = 3 Xor y = 7. True
Not x = 3. True
3.2.Arithmetic Operator
3.2.1.Shortcut assignment operators
3.2.2.Power calculator
3.2.3.Boolean value with And and Or
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.