Exercise: Refactor From Loops to LINQ
Use LINQ Methods Instead of Loops
Now, it’s your turn!
Let’s practice refactoring code to use LINQ. For this exercise, rewrite three code blocks that use looping logic to use the appropriate LINQ methods instead.
Follow the instructions in the comments to complete this exercise.