C# Lambda expressions: Why should I use them?

后端 未结 15 1497
栀梦
栀梦 2020-11-22 03:51

I have quickly read over the Microsoft Lambda Expression documentation.

This kind of example has helped me to understand better, though:

delegate in         


        
15条回答
  •  迷失自我
    2020-11-22 03:57

    This is perhaps the best explanations on why to use lambda expressions -> https://youtu.be/j9nj5dTo54Q

    In summary, it's to improve code readability, reduce chances of errors by reusing rather than replicating code, and leverage optimization happening behind the scenes.

提交回复
热议问题