You already imported and used it with using System.Linq;. What matters is that you do not need an additional iteration with .ToList() just to call .ForEach(), that is what .Aggregate() does for you in a single loop. Good idea for the next article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I am aware that I could have used LINQ, I thought about using LINQ. However it would not be very beginner friendly.
Additionally I might have a LINQ specific blog/tut planned ;)
You already imported and used it with
using System.Linq;
. What matters is that you do not need an additional iteration with.ToList()
just to call.ForEach()
, that is what.Aggregate()
does for you in a single loop. Good idea for the next article.