• Like
Operators
Upcoming SlideShare
Loading in...5
×

Operators

  • 750 views
Uploaded on

This Presentation has the details about the Operators in VB.NET..

This Presentation has the details about the Operators in VB.NET..

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
750
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
14
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Operators in VB.NET
    www.ustudy.in
  • 2. Introduction
    Operator is defined as a symbol that operates the variables and constants to produce a required result.
    www.ustudy.in
  • 3. VB.NET Operators
    Arithmetic operators
    Comparison operators
    Logical operators
    Concatenation operators
    www.ustudy.in
  • 4. Arithmetic operators
    Arithmetic operators are used to perform arithmetic calculations such as addition and subtraction.
    VB.NET supported arithmetic are listed in the given table.
    www.ustudy.in
  • 5. www.ustudy.in
  • 6. Comparison operators
    Comparison operators are used to compare two or more values.
    VB.NET supported comparison operators are listed in the following table.
    www.ustudy.in
  • 7. www.ustudy.in
  • 8. Logical operators
    Logical operators are used to perform logical operations such as AND, OR, NOT on one or more expressions.
    www.ustudy.in
  • 9. AND
    This operator is used as a conjunction of two conditions. The result of the AND operation is True only if both the conditions are true.
    Syntax:
    Result = Expression1 AND Expression2
    www.ustudy.in
  • 10. Result of AND operation table
    www.ustudy.in
  • 11. Example of AND Operator
    Dim a, b, c As Integer
    Dim d As Boolean
    a = 10
    b = 20
    c = 30
    d = (a<b) AND (b<c) ‘Returns True’
    d = (a>b) AND (b<c) ‘Returns False’
    www.ustudy.in
  • 12. OR
    This operator is used as a disjunction of two conditions. The result of the OR operator is false only if both the conditions are false.
    Syntax:
    Result = Expression1 OR Expression2
    www.ustudy.in
  • 13. Result of OR operation table
    www.ustudy.in
  • 14. Example of OR Operator
    Dim a, b, c As Integer
    Dim d As Boolean
    a = 10
    b = 20
    c = 30
    d = (a<b) OR (b>c) ‘Returns True’
    d = (a>b) OR (b>c) ‘Returns False’
    www.ustudy.in
  • 15. XOR
    The result this operator is True only if one of the conditions is true and other is false.
    Syntax:
    Result = Expression1 XOR Expression2
    www.ustudy.in
  • 16. Result of XOR operation table
    www.ustudy.in
  • 17. Example of XOR Operator
    Dim a, b, c As Integer
    Dim d As Boolean
    a = 10
    b = 20
    c = 30
    d = (a<b) XOR (b<c) ‘Returns False’
    d = (a>b) XOR (b<c) ‘Returns True’
    www.ustudy.in
  • 18. NOT
    This logical operator is used to perform a logical negation on a boolean expression.
    Syntax:
    Result = NOT (boolean Expression)
    www.ustudy.in
  • 19. Result of NOT operation table
    www.ustudy.in
  • 20. Example of XOR Operator
    Dim a, b, c As Integer
    Dim d As Boolean
    a = 10
    b = 20
    c = NOT (a>b) ‘Returns True’
    c = NOT (a<b) ‘Returns False’
    www.ustudy.in
  • 21. AndAlso
    This operator is same as AND operator but if the first condition is false then the second condition is not checked and the result is false.
    Syntax:
    Result = Expression 1 AndAlso Expression2
    www.ustudy.in
  • 22. OrElse
    This operator is same as OR operator but if the first condition is true then the second condition is not checked and the result is True.
    Syntax:
    Result = Expression 1 OrElse Expression2
    www.ustudy.in
  • 23. Concatenation operators
    Concatenation operators are used to join two string values.
    & and + are the two concatenation operators available in VB.NET.
    The operator & is used to concatenate two strings and + is used to add two numbers and concatenate two strings.
    www.ustudy.in
  • 24. Example of concatenation operators
    MsgBox(“Good” & “Night”) ‘Returns GoodNight’
    MsgBox(“Good” + “Night”) ‘Returns GoodNight’
    MsgBox(“22” & “33”) ‘Returns 2233’
    MsgBox(“22” + “33”) ‘Returns 2233’
    MsgBox(22 + 33) ‘Returns 55’
    www.ustudy.in
  • 25. The End
    ….. Thank You ……
    www.ustudy.in