foreach Statement
Iteration of arrays
Iteration of user-defined collections
foreach (Customer c in customers.OrderBy("name"))
{
if (c.Orders.Count != 0) {
...
}
}
public static void Main(string[] args) {
foreach (string s in args) Console.WriteLine(s);
}
Previous slide
Next slide
Back to first slide
View graphic version