loop through collection c# if condition first item code example
Example: iteration c#
for (int index = 0; index < days.Length; index++)
{
// Yield each day of the week.
yield return days[index];
}
for (int index = 0; index < days.Length; index++)
{
// Yield each day of the week.
yield return days[index];
}