How to replace for-loops with a functional statement in C#?
Functional constructs often express your intent more clearly than for-loops in cases where you operate on some data set and want to transform, filter or aggregate the elements. Loops are very appropriate when you want to repeatedly execute some action. For example int x = array.Sum(); much more clearly expresses your intent than int x … Read more