So I have these few lines of code:
string[] newData = File.ReadAllLines(fileName)
int length = newData.Length;
for (int i = 0; i < 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
}
}
I've tried with goto, but as you can see, if I start the for loop again, it'll start from the first line.
So how can I restart the loop and change the starting line(getting different key from the array)?