.NET FrameworkForEach

Download .NET Framework for free


Use it at all?

You might argue that the intention of the .NET framework is that queries do not have any side effects and the ForEach method is by definition causing a side effect. You might find your code more maintainable and easier to test if you use a plain foreach instead.

Related Examples

Calling a method on an object in a list