c# foreach loop in linq code example
Example 1: The foreach Loop c#
string[] names = {"William.", "James", "Oliver", "Lucas"};
foreach (string i in names)
{
Console.WriteLine(i);
}
Example 2: c# foreach
foreach (int num in numbers)
{
}
string[] names = {"William.", "James", "Oliver", "Lucas"};
foreach (string i in names)
{
Console.WriteLine(i);
}
foreach (int num in numbers)
{
}