Answers for "C# inline foreach"

C#
6

how do i foreach c#

//No counter just the foreach.
 //the HelloWorld is the Class objects name nor a public string can be used aswell.
foreach (string element in fibNumbers)
{
    Console.WriteLine(element.HelloWorld);
}
Posted by: Guest on June-29-2020
4

c# foreach

var numbers = new NumberList<int> { 0, 1, 2, 3, 4, 5 };
foreach (int num in numbers)
{
    DoSomething();
}
Posted by: Guest on September-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language