Hai guys,
My fellow developers were talking about lambda expressions this morning. So i decided to ask it here in SO
- when should i use lambda expression
which comes with C# 3.0?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think that there is a general rule when your should use them, but if I look to myself I tend to use them whenever I use anonymous methods. Most often this happens when spawning some code in a new thread using the
ThreadPool, or when doing LINQ queries.ThreadPool example:
LINQ: