Is there a way to get the index in the foreach loop? Also ability to increment or decrement the index as needed. Running into error conditions during the loop which require the loop to run again.
I was hoping for something like this in a regular for loop where you have access to the variable ‘i’.
for (int i = 0; i < fibarray.Length; i++)
{
System.Console.WriteLine(fibarray[i]);
}
System.Console.WriteLine();