SlideShare a Scribd company logo
Operators in VB.NETwww.ustudy.in
IntroductionOperator is defined as a symbol that operates the variables and constants to produce a required result.www.ustudy.in
VB.NET OperatorsArithmetic operatorsComparison operatorsLogical operatorsConcatenation operatorswww.ustudy.in
Arithmetic operatorsArithmetic 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
www.ustudy.in
Comparison operatorsComparison operators are used to compare two or more values.VB.NET supported comparison operators are listed in the following table.www.ustudy.in
www.ustudy.in
Logical operatorsLogical operators are used to perform logical operations such as AND, OR, NOT on one or more expressions.www.ustudy.in
ANDThis 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 Expression2www.ustudy.in
Result of AND operation tablewww.ustudy.in
Example of AND Operator	Dim a, b, c As Integer	Dim d As Boolean	a = 10	b = 20	c = 30d = (a<b) AND (b<c)	‘Returns True’d = (a>b) AND (b<c)	‘Returns False’www.ustudy.in
ORThis 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 Expression2www.ustudy.in
Result of OR operation tablewww.ustudy.in
Example of OR Operator	Dim a, b, c As Integer	Dim d As Boolean	a = 10	b = 20	c = 30d = (a<b) OR (b>c)	‘Returns True’d = (a>b) OR (b>c)	‘Returns False’www.ustudy.in
XORThe result this operator is True only if one of the conditions is true and other is false.      Syntax:Result = Expression1 XOR Expression2www.ustudy.in
Result of XOR operation tablewww.ustudy.in
Example of XOR Operator	Dim a, b, c As Integer	Dim d As Boolean	a = 10	b = 20	c = 30d = (a<b) XOR (b<c)	‘Returns False’d = (a>b) XOR (b<c)	‘Returns True’www.ustudy.in
NOTThis logical operator is used to perform a logical negation on a boolean expression.     Syntax:Result = NOT (boolean Expression)www.ustudy.in
Result of NOT operation tablewww.ustudy.in
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
AndAlsoThis 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 Expression2www.ustudy.in
OrElseThis 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 Expression2www.ustudy.in
Concatenation operatorsConcatenation 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
Example of concatenation operatorsMsgBox(“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
The End		….. Thank You ……www.ustudy.in
Ad

More Related Content

What's hot (20)

javascript objects
javascript objectsjavascript objects
javascript objects
Vijay Kalyan
 
Stack
StackStack
Stack
Zaid Shabbir
 
Java- Nested Classes
Java- Nested ClassesJava- Nested Classes
Java- Nested Classes
Prabhdeep Singh
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functions
sinhacp
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
Bala Narayanan
 
Oracle: Control Structures
Oracle: Control StructuresOracle: Control Structures
Oracle: Control Structures
DataminingTools Inc
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
Rokonuzzaman Rony
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt
Tareq Hasan
 
[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions
Muhammad Hammad Waseem
 
Classes objects in java
Classes objects in javaClasses objects in java
Classes objects in java
Madishetty Prathibha
 
This pointer
This pointerThis pointer
This pointer
Kamal Acharya
 
Java layoutmanager
Java layoutmanagerJava layoutmanager
Java layoutmanager
Arati Gadgil
 
for loop in java
for loop in java for loop in java
for loop in java
Majid Ali
 
Loops c++
Loops c++Loops c++
Loops c++
Shivani Singh
 
Aggregate function
Aggregate functionAggregate function
Aggregate function
Rayhan Chowdhury
 
Php forms
Php formsPhp forms
Php forms
Anne Lee
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
Shyam Sir
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
 
Type casting in java
Type casting in javaType casting in java
Type casting in java
Farooq Baloch
 
Mysql Crud, Php Mysql, php, sql
Mysql Crud, Php Mysql, php, sqlMysql Crud, Php Mysql, php, sql
Mysql Crud, Php Mysql, php, sql
Aimal Miakhel
 
javascript objects
javascript objectsjavascript objects
javascript objects
Vijay Kalyan
 
Aggregate functions
Aggregate functionsAggregate functions
Aggregate functions
sinhacp
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt
Tareq Hasan
 
[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions
Muhammad Hammad Waseem
 
Java layoutmanager
Java layoutmanagerJava layoutmanager
Java layoutmanager
Arati Gadgil
 
for loop in java
for loop in java for loop in java
for loop in java
Majid Ali
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
Shyam Sir
 
Inheritance in JAVA PPT
Inheritance  in JAVA PPTInheritance  in JAVA PPT
Inheritance in JAVA PPT
Pooja Jaiswal
 
Type casting in java
Type casting in javaType casting in java
Type casting in java
Farooq Baloch
 
Mysql Crud, Php Mysql, php, sql
Mysql Crud, Php Mysql, php, sqlMysql Crud, Php Mysql, php, sql
Mysql Crud, Php Mysql, php, sql
Aimal Miakhel
 

Viewers also liked (13)

Arrays
ArraysArrays
Arrays
Notre Dame of Midsayap College
 
JavaScript: The Language
JavaScript: The LanguageJavaScript: The Language
JavaScript: The Language
Engage Software
 
Rediscovering JavaScript: The Language Behind The Libraries
Rediscovering JavaScript: The Language Behind The LibrariesRediscovering JavaScript: The Language Behind The Libraries
Rediscovering JavaScript: The Language Behind The Libraries
Simon Willison
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
foOfys Solutions
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
L2 datatypes and variables
L2 datatypes and variablesL2 datatypes and variables
L2 datatypes and variables
teach4uin
 
INPUT BOX- VBA
INPUT BOX- VBAINPUT BOX- VBA
INPUT BOX- VBA
ViVek Patel
 
VB Function and procedure
VB Function and procedureVB Function and procedure
VB Function and procedure
pragya ratan
 
Java Basics
Java BasicsJava Basics
Java Basics
Emprovise
 
Objects and classes in Visual Basic
Objects and classes in Visual BasicObjects and classes in Visual Basic
Objects and classes in Visual Basic
Sangeetha Sg
 
JavaScript Intro
JavaScript IntroJavaScript Intro
JavaScript Intro
Eric Brown
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
Sehwan Noh
 
बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में
Chand Rook
 
JavaScript: The Language
JavaScript: The LanguageJavaScript: The Language
JavaScript: The Language
Engage Software
 
Rediscovering JavaScript: The Language Behind The Libraries
Rediscovering JavaScript: The Language Behind The LibrariesRediscovering JavaScript: The Language Behind The Libraries
Rediscovering JavaScript: The Language Behind The Libraries
Simon Willison
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
foOfys Solutions
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
L2 datatypes and variables
L2 datatypes and variablesL2 datatypes and variables
L2 datatypes and variables
teach4uin
 
VB Function and procedure
VB Function and procedureVB Function and procedure
VB Function and procedure
pragya ratan
 
Objects and classes in Visual Basic
Objects and classes in Visual BasicObjects and classes in Visual Basic
Objects and classes in Visual Basic
Sangeetha Sg
 
JavaScript Intro
JavaScript IntroJavaScript Intro
JavaScript Intro
Eric Brown
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
Sehwan Noh
 
बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में बेसिक जावा प्रोग्रामिंग हिंदी में
बेसिक जावा प्रोग्रामिंग हिंदी में
Chand Rook
 
Ad

Similar to Operators (20)

C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
jahanullah
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
guest58c84c
 
Operators
OperatorsOperators
Operators
Kamran
 
Programming C Part 02
Programming C Part 02Programming C Part 02
Programming C Part 02
Raselmondalmehedi
 
Operators
OperatorsOperators
Operators
VijayaLakshmi506
 
Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
Himanshu Kaushik
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
bajiajugal
 
Operator 04 (js)
Operator 04 (js)Operator 04 (js)
Operator 04 (js)
AbhishekMondal42
 
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERSC++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
AAFREEN SHAIKH
 
Chapter 3:Programming with Java Operators and Strings
Chapter 3:Programming with Java Operators and  StringsChapter 3:Programming with Java Operators and  Strings
Chapter 3:Programming with Java Operators and Strings
It Academy
 
11operator in c#
11operator in c#11operator in c#
11operator in c#
Sireesh K
 
C++ Expressions Notes
C++ Expressions NotesC++ Expressions Notes
C++ Expressions Notes
Prof Ansari
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
MuhammadAtif231
 
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
Sitamarhi Institute of Technology
 
Python : basic operators
Python : basic operatorsPython : basic operators
Python : basic operators
S.M. Salaquzzaman
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
It Academy
 
Chapter 3 : Programming with Java Operators and Strings
Chapter 3 : Programming with Java Operators and  StringsChapter 3 : Programming with Java Operators and  Strings
Chapter 3 : Programming with Java Operators and Strings
It Academy
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
savitamhaske
 
Additional Relational Algebra Operations
Additional Relational Algebra OperationsAdditional Relational Algebra Operations
Additional Relational Algebra Operations
A. S. M. Shafi
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
C Sharp Jn (2)
C Sharp Jn (2)C Sharp Jn (2)
C Sharp Jn (2)
jahanullah
 
Operators
OperatorsOperators
Operators
Kamran
 
Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++Lecture 2 C++ | Variable Scope, Operators in c++
Lecture 2 C++ | Variable Scope, Operators in c++
Himanshu Kaushik
 
Operator & Expression in c++
Operator & Expression in c++Operator & Expression in c++
Operator & Expression in c++
bajiajugal
 
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERSC++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
C++ notes.pdf BASIC C++ NOTES FOR BEGGINERS
AAFREEN SHAIKH
 
Chapter 3:Programming with Java Operators and Strings
Chapter 3:Programming with Java Operators and  StringsChapter 3:Programming with Java Operators and  Strings
Chapter 3:Programming with Java Operators and Strings
It Academy
 
11operator in c#
11operator in c#11operator in c#
11operator in c#
Sireesh K
 
C++ Expressions Notes
C++ Expressions NotesC++ Expressions Notes
C++ Expressions Notes
Prof Ansari
 
Operators In Java Part - 8
Operators In Java Part - 8Operators In Java Part - 8
Operators In Java Part - 8
MuhammadAtif231
 
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
PPS 2.2.OPERATORS ARITHMETIC EXPRESSIONS/ARITHMETIC OPERATORS/RELATIONAL OPER...
Sitamarhi Institute of Technology
 
Chapter 3 : Programming with Java Operators and Strings
Chapter 3 : Programming with Java Operators and  StringsChapter 3 : Programming with Java Operators and  Strings
Chapter 3 : Programming with Java Operators and Strings
It Academy
 
Operators in c programming
Operators in c programmingOperators in c programming
Operators in c programming
savitamhaske
 
Additional Relational Algebra Operations
Additional Relational Algebra OperationsAdditional Relational Algebra Operations
Additional Relational Algebra Operations
A. S. M. Shafi
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
Neeru Mittal
 
Ad

More from Then Murugeshwari (20)

Traffic safety
Traffic safetyTraffic safety
Traffic safety
Then Murugeshwari
 
P h indicators
P h indicatorsP h indicators
P h indicators
Then Murugeshwari
 
Avogadro's law
Avogadro's lawAvogadro's law
Avogadro's law
Then Murugeshwari
 
Resonance
ResonanceResonance
Resonance
Then Murugeshwari
 
Microwave remote sensing
Microwave remote sensingMicrowave remote sensing
Microwave remote sensing
Then Murugeshwari
 
Newton's law
Newton's lawNewton's law
Newton's law
Then Murugeshwari
 
Surface tension
Surface tensionSurface tension
Surface tension
Then Murugeshwari
 
Hook's law
Hook's lawHook's law
Hook's law
Then Murugeshwari
 
Hook's law
Hook's lawHook's law
Hook's law
Then Murugeshwari
 
ERP components
ERP componentsERP components
ERP components
Then Murugeshwari
 
Database fundamentals
Database fundamentalsDatabase fundamentals
Database fundamentals
Then Murugeshwari
 
Mosfet
MosfetMosfet
Mosfet
Then Murugeshwari
 
Hiperlan
HiperlanHiperlan
Hiperlan
Then Murugeshwari
 
Bluetooth profile
Bluetooth profileBluetooth profile
Bluetooth profile
Then Murugeshwari
 
Router
RouterRouter
Router
Then Murugeshwari
 
Operators in java
Operators in javaOperators in java
Operators in java
Then Murugeshwari
 
Thread priorities
Thread prioritiesThread priorities
Thread priorities
Then Murugeshwari
 
Threads
ThreadsThreads
Threads
Then Murugeshwari
 
Identifiers
Identifiers Identifiers
Identifiers
Then Murugeshwari
 
Virtual ground
Virtual groundVirtual ground
Virtual ground
Then Murugeshwari
 

Operators

  • 2. IntroductionOperator is defined as a symbol that operates the variables and constants to produce a required result.www.ustudy.in
  • 3. VB.NET OperatorsArithmetic operatorsComparison operatorsLogical operatorsConcatenation operatorswww.ustudy.in
  • 4. Arithmetic operatorsArithmetic 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
  • 6. Comparison operatorsComparison operators are used to compare two or more values.VB.NET supported comparison operators are listed in the following table.www.ustudy.in
  • 8. Logical operatorsLogical operators are used to perform logical operations such as AND, OR, NOT on one or more expressions.www.ustudy.in
  • 9. ANDThis 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 Expression2www.ustudy.in
  • 10. Result of AND operation tablewww.ustudy.in
  • 11. Example of AND Operator Dim a, b, c As Integer Dim d As Boolean a = 10 b = 20 c = 30d = (a<b) AND (b<c) ‘Returns True’d = (a>b) AND (b<c) ‘Returns False’www.ustudy.in
  • 12. ORThis 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 Expression2www.ustudy.in
  • 13. Result of OR operation tablewww.ustudy.in
  • 14. Example of OR Operator Dim a, b, c As Integer Dim d As Boolean a = 10 b = 20 c = 30d = (a<b) OR (b>c) ‘Returns True’d = (a>b) OR (b>c) ‘Returns False’www.ustudy.in
  • 15. XORThe result this operator is True only if one of the conditions is true and other is false. Syntax:Result = Expression1 XOR Expression2www.ustudy.in
  • 16. Result of XOR operation tablewww.ustudy.in
  • 17. Example of XOR Operator Dim a, b, c As Integer Dim d As Boolean a = 10 b = 20 c = 30d = (a<b) XOR (b<c) ‘Returns False’d = (a>b) XOR (b<c) ‘Returns True’www.ustudy.in
  • 18. NOTThis 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 tablewww.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. AndAlsoThis 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 Expression2www.ustudy.in
  • 22. OrElseThis 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 Expression2www.ustudy.in
  • 23. Concatenation operatorsConcatenation 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 operatorsMsgBox(“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