SlideShare a Scribd company logo
1 of 11
Presented By:

         Name : Abhishek Pachisia
         Course : B.Tech-IT(Sem V)
         Roll No. : 090102801
Made By: Abhishek Pachisia           1
What is VB.NET?

•It is simply Visual Basic for .NET platform developed
by Microsoft.

•It has more components and control than Visual Basic


           Made By: Abhishek Pachisia                    2
Visual Basic loop structures allow to run one or
more lines of code repetitively

Statements in a loop structure can be repeated

   Until a condition is True
   Until a condition is False
   A specified number of times, or
   Once for each element in a collection.
            Made By: Abhishek Pachisia              3
Types of Looping:

There are mainly 3 types of loop:

For Loop

While Loop

Do Loop


            Made By: Abhishek Pachisia   4
• The For loop is the most popular loop.

•For loops enable us to execute a series of expressions
multiple numbers of times.

•Syntax:

        For index=start to end[Step step]
        [statements]
        [Exit For]
        [statements]
        Next[index]

              Made By: Abhishek Pachisia                  5
Example:

    Module Module1

    Sub Main()
    Dim d As Integer
    For d = 0 To 2
    System.Console.WriteLine("In the For Loop")
    Next d
    End Sub

    End Module


           Made By: Abhishek Pachisia             6
•While loop keeps executing until the
condition against which it tests remain true.

•Syntax:

       While condition
      [statements]
      End While


            Made By: Abhishek Pachisia          7
Example:

      Module Module1

       Sub Main()
       Dim d, e As Integer
       d=0
       e=6
       While e > 4
       e -= 1
       d += 1
       End While
       System.Console.WriteLine("The Loop ran " & e &
"times")
       End Sub

      End Module By: Abhishek Pachisia
             Made                                       8
•The Do loop keeps executing it's statements while or until the
condition is true.
•Two keywords, while and until can be used with the do loop.
•The Do loop also supports an Exit Do statement which makes
the loop to exit at any moment.

•Syntax:

       Do[{while | Until} condition]
       [statements]
       [Exit Do]
       [statements]
       Loop

                 Made By: Abhishek Pachisia                       9
Example:

    Module Module1

    Sub Main()
    Dim str As String
    Do Until str = "Cool"
    System.Console.WriteLine("What to do?")
    str = System.Console.ReadLine()
    Loop
    End Sub

    End Module

           Made By: Abhishek Pachisia         10
Made By: Abhishek Pachisia   11

More Related Content

What's hot

What's hot (20)

Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
Static Data Members and Member Functions
Static Data Members and Member FunctionsStatic Data Members and Member Functions
Static Data Members and Member Functions
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
 
Shell programming
Shell programmingShell programming
Shell programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
 
Break and continue
Break and continueBreak and continue
Break and continue
 
Multithreading
Multithreading Multithreading
Multithreading
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
 
Compiler design
Compiler designCompiler design
Compiler design
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
Debugging
DebuggingDebugging
Debugging
 
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORYGE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
GE3171-PROBLEM SOLVING AND PYTHON PROGRAMMING LABORATORY
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Assemblers
AssemblersAssemblers
Assemblers
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
Interpreter
InterpreterInterpreter
Interpreter
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
 

Similar to Vb.net (loop structure)

MERIMeeting du 27 mai 2014 - Parallel Programming
MERIMeeting du 27 mai 2014 - Parallel ProgrammingMERIMeeting du 27 mai 2014 - Parallel Programming
MERIMeeting du 27 mai 2014 - Parallel ProgrammingOlivier NAVARRE
 
C# Async/Await Explained
C# Async/Await ExplainedC# Async/Await Explained
C# Async/Await ExplainedJeremy Likness
 
6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptxSimRelokasi2
 
Of Owls and IO Objects
Of Owls and IO ObjectsOf Owls and IO Objects
Of Owls and IO ObjectsFelix Morgner
 
Ansible module development 101
Ansible module development 101Ansible module development 101
Ansible module development 101yfauser
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleRusty Klophaus
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debuggerIulian Dragos
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxAOmaAli
 
Simplifying your test runs with „Make“
Simplifying your test runs with „Make“Simplifying your test runs with „Make“
Simplifying your test runs with „Make“Benjamin Bischoff
 
Awesome Concurrency with Elixir Tasks
Awesome Concurrency with Elixir TasksAwesome Concurrency with Elixir Tasks
Awesome Concurrency with Elixir TasksJonathan Magen
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration TestersNikhil Mittal
 
Supercharge PBCS with PowerShell
Supercharge PBCS with PowerShellSupercharge PBCS with PowerShell
Supercharge PBCS with PowerShellKyle Goodfriend
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughgabriellekuruvilla
 
Introduction to Murasaki
Introduction to MurasakiIntroduction to Murasaki
Introduction to MurasakiSeiichi Horie
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IDUSPviz
 
Hudson
HudsonHudson
Hudson8x8
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfRichard Martens
 

Similar to Vb.net (loop structure) (20)

MERIMeeting du 27 mai 2014 - Parallel Programming
MERIMeeting du 27 mai 2014 - Parallel ProgrammingMERIMeeting du 27 mai 2014 - Parallel Programming
MERIMeeting du 27 mai 2014 - Parallel Programming
 
C# Async/Await Explained
C# Async/Await ExplainedC# Async/Await Explained
C# Async/Await Explained
 
6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx6-9-2017-slides-vFinal.pptx
6-9-2017-slides-vFinal.pptx
 
Of Owls and IO Objects
Of Owls and IO ObjectsOf Owls and IO Objects
Of Owls and IO Objects
 
Ansible module development 101
Ansible module development 101Ansible module development 101
Ansible module development 101
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
 
Rethinking the debugger
Rethinking the debuggerRethinking the debugger
Rethinking the debugger
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
LECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptxLECTURE 1 - Introduction to Programming.pptx
LECTURE 1 - Introduction to Programming.pptx
 
Simplifying your test runs with „Make“
Simplifying your test runs with „Make“Simplifying your test runs with „Make“
Simplifying your test runs with „Make“
 
Awesome Concurrency with Elixir Tasks
Awesome Concurrency with Elixir TasksAwesome Concurrency with Elixir Tasks
Awesome Concurrency with Elixir Tasks
 
Os lectures
Os lecturesOs lectures
Os lectures
 
PowerShell for Penetration Testers
PowerShell for Penetration TestersPowerShell for Penetration Testers
PowerShell for Penetration Testers
 
Supercharge PBCS with PowerShell
Supercharge PBCS with PowerShellSupercharge PBCS with PowerShell
Supercharge PBCS with PowerShell
 
Python and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthroughPython and Pytorch tutorial and walkthrough
Python and Pytorch tutorial and walkthrough
 
Intro to .NET and Core C#
Intro to .NET and Core C#Intro to .NET and Core C#
Intro to .NET and Core C#
 
Introduction to Murasaki
Introduction to MurasakiIntroduction to Murasaki
Introduction to Murasaki
 
Python Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part IPython Programming for ArcGIS: Part I
Python Programming for ArcGIS: Part I
 
Hudson
HudsonHudson
Hudson
 
APEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdfAPEX Application Lifecycle and Deployment 20220714.pdf
APEX Application Lifecycle and Deployment 20220714.pdf
 

More from Abhishek Pachisia (20)

Telecom Industry
Telecom IndustryTelecom Industry
Telecom Industry
 
Strategic alignment model (SAM)
Strategic alignment model (SAM)Strategic alignment model (SAM)
Strategic alignment model (SAM)
 
V.G. siddhartha
V.G. siddharthaV.G. siddhartha
V.G. siddhartha
 
Boeing- The Frontiers
Boeing- The FrontiersBoeing- The Frontiers
Boeing- The Frontiers
 
Top Management of 5 recognized comapanies
Top Management of 5 recognized comapaniesTop Management of 5 recognized comapanies
Top Management of 5 recognized comapanies
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Inference engine
Inference engineInference engine
Inference engine
 
Work breakdown structure
Work breakdown structureWork breakdown structure
Work breakdown structure
 
IEEE 802.11
IEEE 802.11IEEE 802.11
IEEE 802.11
 
Cloud Service Models
Cloud Service ModelsCloud Service Models
Cloud Service Models
 
Exception handling in Java
Exception handling in JavaException handling in Java
Exception handling in Java
 
Perl
PerlPerl
Perl
 
Rpc
RpcRpc
Rpc
 
Program Evaluation and Review Technique (PERT)
Program Evaluation and Review Technique (PERT)Program Evaluation and Review Technique (PERT)
Program Evaluation and Review Technique (PERT)
 
Hydrogen energy
Hydrogen energyHydrogen energy
Hydrogen energy
 
Rms titanic
Rms titanicRms titanic
Rms titanic
 
Matrix Representation Of Graph
Matrix Representation Of GraphMatrix Representation Of Graph
Matrix Representation Of Graph
 
Tree
TreeTree
Tree
 
File System Implementation
File System ImplementationFile System Implementation
File System Implementation
 
Exception handling
Exception handlingException handling
Exception handling
 

Recently uploaded

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 

Vb.net (loop structure)

  • 1. Presented By: Name : Abhishek Pachisia Course : B.Tech-IT(Sem V) Roll No. : 090102801 Made By: Abhishek Pachisia 1
  • 2. What is VB.NET? •It is simply Visual Basic for .NET platform developed by Microsoft. •It has more components and control than Visual Basic Made By: Abhishek Pachisia 2
  • 3. Visual Basic loop structures allow to run one or more lines of code repetitively Statements in a loop structure can be repeated Until a condition is True Until a condition is False A specified number of times, or Once for each element in a collection. Made By: Abhishek Pachisia 3
  • 4. Types of Looping: There are mainly 3 types of loop: For Loop While Loop Do Loop Made By: Abhishek Pachisia 4
  • 5. • The For loop is the most popular loop. •For loops enable us to execute a series of expressions multiple numbers of times. •Syntax: For index=start to end[Step step] [statements] [Exit For] [statements] Next[index] Made By: Abhishek Pachisia 5
  • 6. Example: Module Module1 Sub Main() Dim d As Integer For d = 0 To 2 System.Console.WriteLine("In the For Loop") Next d End Sub End Module Made By: Abhishek Pachisia 6
  • 7. •While loop keeps executing until the condition against which it tests remain true. •Syntax: While condition [statements] End While Made By: Abhishek Pachisia 7
  • 8. Example: Module Module1 Sub Main() Dim d, e As Integer d=0 e=6 While e > 4 e -= 1 d += 1 End While System.Console.WriteLine("The Loop ran " & e & "times") End Sub End Module By: Abhishek Pachisia Made 8
  • 9. •The Do loop keeps executing it's statements while or until the condition is true. •Two keywords, while and until can be used with the do loop. •The Do loop also supports an Exit Do statement which makes the loop to exit at any moment. •Syntax: Do[{while | Until} condition] [statements] [Exit Do] [statements] Loop Made By: Abhishek Pachisia 9
  • 10. Example: Module Module1 Sub Main() Dim str As String Do Until str = "Cool" System.Console.WriteLine("What to do?") str = System.Console.ReadLine() Loop End Sub End Module Made By: Abhishek Pachisia 10
  • 11. Made By: Abhishek Pachisia 11