Jump to content

  •  

  • iBotModz CBox


    Photo

    (C#) Loops


    • Please log in to reply
    5 replies to this topic

    #1 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 11 May 2009 - 09:44 PM

    Removed.

    Edited by Dark Slipstream, 16 August 2009 - 10:51 PM.


    #2 dschu012

    dschu012

      Private Grade 2

    • Members+

    • 83 posts
    • Joined: 19-March 08

    Posted 11 May 2009 - 09:56 PM

    Should just be called a for loop not "for next". While your at it why not cover do while (they can be helpful) and foreach.

    Edited by dschu012, 11 May 2009 - 09:58 PM.


    #3 T3A guy

    T3A guy

      :)

    • Members+

    • 1,191 posts
    • Joined: 09-May 08
    • Gender:Male

    Posted 11 May 2009 - 09:57 PM

    LOL doesn't everyone know this?

    Ima post how to do if then statements for more posts. :p

    #4 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 11 May 2009 - 10:03 PM

    While is in there, look further down.

    #5 dschu012

    dschu012

      Private Grade 2

    • Members+

    • 83 posts
    • Joined: 19-March 08

    Posted 12 May 2009 - 12:00 PM

    While is in there, look further down.

    I mean a "do while" loop.

    int i = 0;
    
    do
    {
    i++;
    }while(i < 10);

    That example really doesn't prove to be helpful. But it can be very helpful whenever you need to do something atleast once, then repeat the action based on the results.

    Edited by dschu012, 12 May 2009 - 12:00 PM.


    #6 Dark Slipstream

    Dark Slipstream

      Blue Shadowz Owner

    • Members+

    • 2,829 posts
    • Joined: 19-April 08
    • Gender:Male
    • Location:Canada, ON

    Posted 12 May 2009 - 12:08 PM

    While and Do While are the same thing.

    One is just more effort lol.