title: c# restart for loop
body: <p>So I have these few lines of code:</p>
  
  <pre><code>string[] newData = File.ReadAllLines(fileName)
  int length = newData.Length;
  for (int i = 0; i &lt; length; i++)
  {
      if (Condition)
      {
         //do something with the first line
      }
      else
      {
        //restart the for loop BUT skip first line and start reading from the second
      }
  }
  </code></pre>
  
  <p>I've tried with goto, but as you can see, if I start the for loop again, it'll start from the first line.</p>
  
  <p>So how can I restart the loop and change the starting line(getting different key from the array)?</p>