SlideShare a Scribd company logo
1 of 17
Decision making
1
Shyam N. Chawda +91 78 74 39 11 91
It’s decide the flow of program
2 types
• Branching statements, Test Structure, Decision
Structure
• Loop statements
2
Shyam N. Chawda 9374928879
Branching Statements
• If, Select case
Loop Statements
• For,Do,While
3
Shyam N. Chawda 9374928879
If condition Then
Logic…
End if
If condition Then
Logic…
Else
Logic….
End if
If condition Then
Logic…
ElseIf condition-n Then
Logic..
Else
Logic…
End If
4
Shyam N. Chawda 9374928879
If TotalMarks>150 then
Logic..
End if
If a=b then
Logic..
Else
Logic..
End if
If Marks>0 and Marks<50 then
Logic..
Else if Marks>=50 and Marks<100
then
Logic..
Else if Marks>=100 and Marks<150
then
Logic..
End if
5
Shyam N. Chawda 9374928879
When it finds a True condition
Else statement block, which Visual
Basic.net executes if none of the conditions
are True.
You can have any number of ElseIf
6
Shyam N. Chawda 9374928879
 You can use And / Or condition with it.
 Example:
If marks>50 and marks<100 then
statements
Else if marks>=100 and marks<150 then
statements
End if
7
Shyam N. Chawda 9374928879
Leap Year
Odd,Even
Positive ,Negative
Maximum,Minimum number
Mark of students
• Between 0 - 50,50 –100 ,100-150
8
Shyam N. Chawda 9374928879
Whereas the If and ElseIf statements
can evaluate a different expression in
each statement,
The Select statement evaluates a
single expression only once and uses
it for every comparison.
9
Shyam N. Chawda 9374928879
Select Case testexpression
[Case expressionlist-n
[statements-n]] ...
[Case Else
[elsestatements]]
End Select
10
Shyam N. Chawda 9374928879
Select Performance
Case 1 ' Performance is 1.
Return Salary * 0.1
Case 2, 3 ' Performance is 2 or 3.
Return Salary * 0.09
Case 5 To 7 ' Performance is 5, 6, or 7.
Return Salary * 0.07
11
Shyam N. Chawda 9374928879
Case 4, 8 To 10 ‘Performance is 4, 8, 9, or 10.
Return Salary * 0.05
Case Is < 14 'Performance is 11, 12, 13.
Return 100
Case Else ' Performance is < 1 or > 14.
Return 0
End select
12
Shyam N. Chawda 9374928879
Select Case JobPlace
Case “Ahmedabad”
logic…
Case “Mumbai”,”Delhi”,”Chennai”
logic..
Case Else
logic..
End select 13
Shyam N. Chawda 9374928879
If multiple Case statements are True,
only the statements belonging to the
first true Case statement are
executed.
Case Else clause must be the last
Case clause.
14
Shyam N. Chawda 9374928879
Use the To keyword to specify a
range of values.
The Is keyword is used to precede
any comparison operators.
15
Shyam N. Chawda 9374928879
Enter Color name and according
to it textbox color will change
Enter student no according to no
display message “Good”,”Try best
in next exam”,”Need to improve”
16
Shyam N. Chawda 9374928879
Any questions?
www.shyamsir.com
Shyam N. Chawda 9374928879 17

More Related Content

What's hot (20)

Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Arrays and Strings
Arrays and Strings Arrays and Strings
Arrays and Strings
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
Ambiguous & Unambiguous Grammar
Ambiguous & Unambiguous GrammarAmbiguous & Unambiguous Grammar
Ambiguous & Unambiguous Grammar
 
Analog and digital
Analog and digitalAnalog and digital
Analog and digital
 
Er model ppt
Er model pptEr model ppt
Er model ppt
 
Chapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementChapter 5 Database Transaction Management
Chapter 5 Database Transaction Management
 
Types of computers
Types of computersTypes of computers
Types of computers
 
Evolution of operating system
Evolution of operating systemEvolution of operating system
Evolution of operating system
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of Compiler
 
Parsing
ParsingParsing
Parsing
 
Compiler design
Compiler designCompiler design
Compiler design
 
Operators and expressions in C++
Operators and expressions in C++Operators and expressions in C++
Operators and expressions in C++
 
Schedule in DBMS
Schedule in DBMSSchedule in DBMS
Schedule in DBMS
 
Number Systems
Number SystemsNumber Systems
Number Systems
 
Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computation
 
Introduction and brief history of computers
Introduction and brief history of computersIntroduction and brief history of computers
Introduction and brief history of computers
 
If statements in c programming
If statements in c programmingIf statements in c programming
If statements in c programming
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
Discrete Structures. Lecture 1
 Discrete Structures. Lecture 1  Discrete Structures. Lecture 1
Discrete Structures. Lecture 1
 

Viewers also liked

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.NETShyam Sir
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3a_akhavan
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.netGirija Muscut
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prologPreston Lee
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.netGirija Muscut
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Larry Nung
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information scienceS. Kate Devitt
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uNikola Plejic
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valueGirija Muscut
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be SeenMark Pesce
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++Microsoft
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15Niit Care
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.netGirija Muscut
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignHubbard One
 
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsWolfgang Stock
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technologyGlenn Klith Andersen
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netGirija Muscut
 

Viewers also liked (20)

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
 
Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3Prolog -Cpt114 - Week3
Prolog -Cpt114 - Week3
 
Part2 database connection service based using vb.net
Part2 database connection service based using vb.netPart2 database connection service based using vb.net
Part2 database connection service based using vb.net
 
Logical Programming With ruby-prolog
Logical Programming With ruby-prologLogical Programming With ruby-prolog
Logical Programming With ruby-prolog
 
Presentation1
Presentation1Presentation1
Presentation1
 
Part 3 binding navigator vb.net
Part 3 binding navigator vb.netPart 3 binding navigator vb.net
Part 3 binding navigator vb.net
 
Debugging in visual studio (basic level)
Debugging in visual studio (basic level)Debugging in visual studio (basic level)
Debugging in visual studio (basic level)
 
Cognitive information science
Cognitive information scienceCognitive information science
Cognitive information science
 
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-uPython Tools for Visual Studio: Python na Microsoftovom .NET-u
Python Tools for Visual Studio: Python na Microsoftovom .NET-u
 
Part 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative valuePart 5 create sequence increment value using negative value
Part 5 create sequence increment value using negative value
 
How Not To Be Seen
How Not To Be SeenHow Not To Be Seen
How Not To Be Seen
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++What&rsquo;s new in Visual C++
What&rsquo;s new in Visual C++
 
Vb.net session 15
Vb.net session 15Vb.net session 15
Vb.net session 15
 
Part 1 picturebox using vb.net
Part 1 picturebox using vb.netPart 1 picturebox using vb.net
Part 1 picturebox using vb.net
 
Making Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information DesignMaking Information Usable: The Art & Science of Information Design
Making Information Usable: The Art & Science of Information Design
 
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert HenrichsPioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
Pioneers of Information Science in Europe: The Oeuvre of Norbert Henrichs
 
Transforming the world with Information technology
Transforming the world with Information technologyTransforming the world with Information technology
Transforming the world with Information technology
 
Information Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław MuraszkiewiczInformation Overload and Information Science / Mieczysław Muraszkiewicz
Information Overload and Information Science / Mieczysław Muraszkiewicz
 
Part 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.netPart 8 add,update,delete records using records operation buttons in vb.net
Part 8 add,update,delete records using records operation buttons in vb.net
 

More from Shyam Sir

Mobile Application
Mobile ApplicationMobile Application
Mobile ApplicationShyam Sir
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NETShyam Sir
 
MVC First Basic
MVC First BasicMVC First Basic
MVC First BasicShyam Sir
 
Basic Concept of ASP.NET
Basic Concept of ASP.NETBasic Concept of ASP.NET
Basic Concept of ASP.NETShyam Sir
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NETShyam Sir
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETShyam Sir
 

More from Shyam Sir (8)

Mobile Application
Mobile ApplicationMobile Application
Mobile Application
 
Hosting
HostingHosting
Hosting
 
It new2015
It new2015It new2015
It new2015
 
State Management in ASP.NET
State Management in ASP.NETState Management in ASP.NET
State Management in ASP.NET
 
MVC First Basic
MVC First BasicMVC First Basic
MVC First Basic
 
Basic Concept of ASP.NET
Basic Concept of ASP.NETBasic Concept of ASP.NET
Basic Concept of ASP.NET
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NET
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NET
 

Recently uploaded

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 

If Else .. Select Case in VB.NET

  • 1. Decision making 1 Shyam N. Chawda +91 78 74 39 11 91
  • 2. It’s decide the flow of program 2 types • Branching statements, Test Structure, Decision Structure • Loop statements 2 Shyam N. Chawda 9374928879
  • 3. Branching Statements • If, Select case Loop Statements • For,Do,While 3 Shyam N. Chawda 9374928879
  • 4. If condition Then Logic… End if If condition Then Logic… Else Logic…. End if If condition Then Logic… ElseIf condition-n Then Logic.. Else Logic… End If 4 Shyam N. Chawda 9374928879
  • 5. If TotalMarks>150 then Logic.. End if If a=b then Logic.. Else Logic.. End if If Marks>0 and Marks<50 then Logic.. Else if Marks>=50 and Marks<100 then Logic.. Else if Marks>=100 and Marks<150 then Logic.. End if 5 Shyam N. Chawda 9374928879
  • 6. When it finds a True condition Else statement block, which Visual Basic.net executes if none of the conditions are True. You can have any number of ElseIf 6 Shyam N. Chawda 9374928879
  • 7.  You can use And / Or condition with it.  Example: If marks>50 and marks<100 then statements Else if marks>=100 and marks<150 then statements End if 7 Shyam N. Chawda 9374928879
  • 8. Leap Year Odd,Even Positive ,Negative Maximum,Minimum number Mark of students • Between 0 - 50,50 –100 ,100-150 8 Shyam N. Chawda 9374928879
  • 9. Whereas the If and ElseIf statements can evaluate a different expression in each statement, The Select statement evaluates a single expression only once and uses it for every comparison. 9 Shyam N. Chawda 9374928879
  • 10. Select Case testexpression [Case expressionlist-n [statements-n]] ... [Case Else [elsestatements]] End Select 10 Shyam N. Chawda 9374928879
  • 11. Select Performance Case 1 ' Performance is 1. Return Salary * 0.1 Case 2, 3 ' Performance is 2 or 3. Return Salary * 0.09 Case 5 To 7 ' Performance is 5, 6, or 7. Return Salary * 0.07 11 Shyam N. Chawda 9374928879
  • 12. Case 4, 8 To 10 ‘Performance is 4, 8, 9, or 10. Return Salary * 0.05 Case Is < 14 'Performance is 11, 12, 13. Return 100 Case Else ' Performance is < 1 or > 14. Return 0 End select 12 Shyam N. Chawda 9374928879
  • 13. Select Case JobPlace Case “Ahmedabad” logic… Case “Mumbai”,”Delhi”,”Chennai” logic.. Case Else logic.. End select 13 Shyam N. Chawda 9374928879
  • 14. If multiple Case statements are True, only the statements belonging to the first true Case statement are executed. Case Else clause must be the last Case clause. 14 Shyam N. Chawda 9374928879
  • 15. Use the To keyword to specify a range of values. The Is keyword is used to precede any comparison operators. 15 Shyam N. Chawda 9374928879
  • 16. Enter Color name and according to it textbox color will change Enter student no according to no display message “Good”,”Try best in next exam”,”Need to improve” 16 Shyam N. Chawda 9374928879