Because the foreach statement can’t be used in a fluent API (eg. Linq) we need an extra reference so the portuguese results we’re looping through can be reused when retrieving the max age value. Being able to write code in a fluent API makes it easier to read and reduces the number of (sometimes unnecessary) variables in your code.

C# has a ForEach instance method for List<T> but most of the times you will be dealing with IEnumerable<T> references, so a ForEach extension method would be handy in these cases.

Notice the System.Linq namespace so you don’t need to include any other namespace when using IEnumerable<T>’s extension methods and also the fact that returning the source collection lets the ForEach caller reuse it again.