The Message text: |
Hi!,
This email was created by [MemberName] <[MemberEmail]> who thought you would be interested in the following Article:
"Replacing foreach loop with LINQ" For replacing foreach loop, for a non-query operation, just for performing an operation on each element in the collection, we can use the ForEach method, like the following:students.ToList().ForEach(s => { s.Grade += 10;});
CodeProject also contains hundreds of articles, free source code samples and applications to help in your day to day programming. Why not give it a try! |