Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. how to jump from 'for' statment

how to jump from 'for' statment

Scheduled Pinned Locked Moved C#
tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adel83k
    wrote on last edited by
    #1

    i have a lines of code just like the following and i whould like to jump after checking a specified condition and incressing the i ... somthing like that ... for(int i=0;i<=10;i++) { // // some code.. // if(ok) // here if true i wanna jump and re enter // the 'for' but with value of i++ // // codes will only excute if ok=false; // } how can i do something like that... ADEL K Khalil

    M 1 Reply Last reply
    0
    • A Adel83k

      i have a lines of code just like the following and i whould like to jump after checking a specified condition and incressing the i ... somthing like that ... for(int i=0;i<=10;i++) { // // some code.. // if(ok) // here if true i wanna jump and re enter // the 'for' but with value of i++ // // codes will only excute if ok=false; // } how can i do something like that... ADEL K Khalil

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      I think you want the continue keyword. Michael CP Blog [^]

      N 1 Reply Last reply
      0
      • M Michael P Butler

        I think you want the continue keyword. Michael CP Blog [^]

        N Offline
        N Offline
        Nick Parker
        wrote on last edited by
        #3

        You are correct. - Nick Parker
        My Blog | My Articles

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups