how to write foreach and for loop using lambda expression and linq in c#?
C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manoj BhoirRank #599 · 4K reputationPosted Jun 12, 2015, 9:14 PM EDT
Just use Where and ToList before using ForEach.
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 12, 2015, 9:24 PM EDT