Solved

Learn all the loops in vb.net

Posted on 2012-04-02
6
331 Views
Last Modified: 2012-06-27
Hi,

I would like to learn all the available loops in VB.net.

Please do provide me with a link or links that teaches all the loops from the basic to intermediate to the very advance.

Thanks in advance.
0
Comment
Question by:baabaa_nl
6 Comments
 
LVL 3

Expert Comment

by:Jofnn
ID: 37796286
Hi,

A quick search in Google (or similar search engine) will give you an abundance of suggestions etc.  One such search is https://www.google.co.uk/#q=vb.net%20loops%20tutorial which should give you a lot of things to work on.

Another option, is to search through ExpertsExchange for previous questions and/or posts from Experts.

I hope you find what you need!

Jonathon
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37796363
0
 

Author Comment

by:baabaa_nl
ID: 37796664
hi CodeCruiser,

could you please list me all the names of the loops available in the vb.net language.

Thanks in advance
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37797061
I have listed the names and a link to example in my comment above.
0
 

Author Closing Comment

by:baabaa_nl
ID: 37797095
I was expecting "do until loop" too, but I just now realized that it is part of java and not in vb.net.


Thank  You
0
 
LVL 40
ID: 37799525
For and For Each have been presented. But I would add my personal touch to the different While and Until loops.

Do Until ... Loop is there, as well as Do Loop ... Until but I do not recommend using those. Neither would I recommend using the Do Loop ... While.

Do While ... Loop and While ... End While do the same thing, and I would suggest that you stick to one of those.

You can do anything in a While loop, just by setting the proper condition.

As an example, While x>=10 is the same as Do Until x<10.

Some programmers use both While and Until, as well as the Do ... Loop  While/Until (you are sure to pass at least once in the loop since the condition is at the end) and Do While/Until ... Loop (might not go in at all if the condition is true on the first pass). I do a lot of code review and have found out that programmers that mix the different conditional loops often do mistakes because they are in one kind of loop but code the condition for another one.

Programmer who always use While ... End While do not tend to do that type of mistake because they always use the same logic to prepare their loops. They have one way of looping instead of four. And I repeat, you can do the equivalent of all the 4 types of loops with While ... End While just by using the proper condition.

Another type of loop is recursion, a method that calls itself. Some would not consider that a loop because there is no keyword associated with it, but since it is a way to repeat the same operation many times, I personally see that as a loop.

One can also create some kind of loop by using a Timer.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question