![]() |
|
[.NET] [TUT]Understanding the 'Do' Loop[TUT] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [TUT]Understanding the 'Do' Loop[TUT] (/showthread.php?tid=1593501) Pages: Pages
1
2
|
[TUT]Understanding the 'Do' Loop[TUT] - eXero - Aug 12, 2011 Understanding the 'Do' Loop I have seen many members confused on how to use loops. Loops should be the first thing you should learn about any programming language as loops are important in every language. I am writing this tutorial explaining the Do Loop. Look for my other tutorials on the other loops. Step One Open a new Visual Basic Project. Select Console Application, and name it whatever you want. I named mine "Basic Do Loop". Spoiler (Click to View) Step Two You should have a screen now that shows this code: Spoiler (Click to View) Don't worry about all of that. We are only going to work in Sub Main for the time being. Step Three This is the Do Loop code itself: Spoiler (Click to View) Code Dim i As IntegerCode Do While i < 10Code Dim i As IntegerCode Do While i < 10Code Console.WriteLine(i)Code Console.ReadLine()Code i = i + 1Code LoopStep Four Voila! You have successfully written, and hopefully understood your Basic Do Loop program. Step Five Post a reply with what you thought of this tutorial, how well you understood, etcetra. It only takes ten seconds, and I really would love your feedback. * - Deceptive - Aug 12, 2011 Are you going to make an all in one thread? (Putting all your tutorials together) * - eXero - Aug 12, 2011 I don't know. Should I? Why would I? I can just link the other tutorials in each tutorial. * - Talk3r - Sep 8, 2011 Nice Share Mate , I already Knows about it But Thanks for Nice TUT * - eXero - Aug 19, 2012 Hopefully this will help some noobs out. * - The MammoTh - Aug 19, 2012 Was the screnshot of creating a destop application really needed? * - eXero - Aug 19, 2012 (Aug 19, 2012 03:16 PM)The MammoTh Wrote: Was the screnshot of creating a destop application really needed? No but why does it matte... oh wait it doesn't. * - .Dangerous. - Aug 19, 2012 why isn't "until" explained in with the do loops as well. also I =+ 1, i think I = I + 1 should have died with vb6, however great tutorial, hope it stops some people from asking questions. Edit: it'd be nice to see show helpful references http://msdn.microsoft.com/en-us/library/eked04a7 * - Modesty - Aug 19, 2012 Lol dude you explain the do loop, except not the do until, do while, loop until, loop while, or just a general while loop? Just make a tut called Loops and explain all the iteration and selection loops in vb.net, would help members much more. Don't put out useless tuts wasting bandwidth, just my feedback 😉 * - Dark_Noodles - Aug 19, 2012 (Aug 19, 2012 03:36 PM)Modesty Wrote: Lol dude you explain the do loop, except not the do until, do while, loop until, loop while, or just a general while loop? Just make a tut called Loops and explain all the iteration and selection loops in vb.net, would help members much more. Don't put out useless tuts wasting bandwidth, just my feedback 😉 ^ Agreed. This user had 2 threads about his theme. He puts them on a survey link and expect us to download. Ubers like him are retarded. * - eXero - May 19, 2014 I just read through my old tutorial and it still seems relevant for all you new VB.Net coders. I realize it isn't the best tutorial in the sense of teaching, but as for referencing and learning, it can be of some benefit. * - $lick - May 19, 2014 (May 19, 2014 07:45 AM)eXero Wrote: I just read through my old tutorial and it still seems relevant for all you new VB.Net coders. I realize it isn't the best tutorial in the sense of teaching, but as for referencing and learning, it can be of some benefit. I usually attack grave diggers, But this is still relevant and HQ. * - eXero - May 19, 2014 (May 19, 2014 09:17 AM)๖ۣۜLazy™ Wrote: I usually attack grave diggers, But this is still relevant and HQ. I wouldn't have grave dug it if it weren't relevant. Some people NEED to read this. * - Meerkat. - May 19, 2014 (May 19, 2014 09:53 AM)eXero Wrote: I wouldn't have grave dug it if it weren't relevant. Some people NEED to read this. You think so? If it were a good tutorial, maybe. But this is useless, as is gravedigging this thing. * - ubbelol - May 19, 2014 Bit over the top explaining for such a simple concept IMO. Can just as easily be described as: ![]() Execute code (orange) while expression (yellow) is true. Alternatively if you're looking for more in-depth info you could just read: http://msdn.microsoft.com/en-us/library/eked04a7.aspx |