If I'm explaining the following ForEach feature to someone, is it accurate to say that #2 is the "LINQ foreach approach" or is it simply a "List<T>
extension method" that is not officially associated with LINQ?
var youngCustomers = from c in customers
where c.Age < 30
select c;
//1. traditional foreach approach
foreach (var c in youngCustomers)
{
Console.WriteLine(c.Display());
}
//2. LINQ foreach approach?
youngCustomers.ToList().ForEach(c => Console.WriteLine(c.Display()));