Check out example codes for "iteration c#". It will help you in understanding the concepts better.

Code Example 1

for (int index = 0; index < days.Length; index++)
        {
            // Yield each day of the week.
            yield return days[index];
        }

Learn ReactJs, React Native from akashmittal.com