Featured image of post Why Doesn't IEnumerable<T> Have a ForEach Method?

Why Doesn't IEnumerable<T> Have a ForEach Method?

In C#, types like List<T> (and others such as ImmutableList<T>) include a convenient ForEach method. It can be seen as a more functional-style alternative to the traditional foreach loop. For example: