C# order a foreach code example
Example 1: c# foreach
var numbers = new NumberList<int> { 0, 1, 2, 3, 4, 5 };
foreach (int num in numbers)
{
DoSomething();
}
Example 2: c# foreach
foreach (int num in numbers)
{
}
var numbers = new NumberList<int> { 0, 1, 2, 3, 4, 5 };
foreach (int num in numbers)
{
DoSomething();
}
foreach (int num in numbers)
{
}