home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic .NET - Read Less - Learn More / Visual_Basic.NET_Read_Less_Learn_More_Richard_Bowman_Visual_2002.iso / Resources / Code / Ch4-WorkWithOperators / Module1.vb < prev   
Text File  |  2001-07-12  |  689b  |  32 lines

  1. Module Module1
  2.     
  3.     Sub Main()
  4.         Dim x As Integer = 2
  5.         Dim y As Integer = 5
  6.         Dim z As Integer = 6
  7.         Dim answer As Integer
  8.         answer = (x * y) + z
  9.         Console.WriteLine(answer)
  10.  
  11.         Dim a As Boolean = True
  12.         Dim b As Boolean = False
  13.         Dim answer2 As Boolean
  14.         answer2 = a Or b
  15.         Console.WriteLine(answer2)
  16.  
  17.         If (b Or (z < 5 And answer > 20)) Then
  18.             Console.WriteLine("Conditional returned True.")
  19.         Else
  20.             Console.WriteLine("Conditional returned False.")
  21.         End If
  22.  
  23.         Console.ReadLine()  ' wait for user to press enter
  24.     End Sub
  25.  
  26. End Module
  27.  
  28.  
  29.  
  30.  
  31.  
  32.