21-Conditional Operators

0
305

This Visual Basic Tutorial is all about Conditional Operators.
What is conditional operators? Conditional Operators  refine the statement you’re testing for. For instance,  you can specify  the statement whether it’s greater than, less than, and a whole lot more.

 

The following are the list of Operators:

  • >
  • <
  • =
  • <=
  • =>
  •  <>

 

Example:

  1. Dim x As integer = 4
  2. Dim y As integer = 10
  3. If x = y Then
  4. msgBox (x &amp; " is equal to " &amp; y)
  5. else
  6. <pre>msgBox (x &amp; " is not equal to " &amp; y)
  7. End If

 

Related articles readers might read:

 

Facebook Comments
(Visited 8 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here