What is the difference between lambdas and delegates in the .NET Framework?

后端 未结 17 1335
小蘑菇
小蘑菇 2020-12-12 10:45

I get asked this question a lot and I thought I\'d solicit some input on how to best describe the difference.

17条回答
  •  一整个雨季
    2020-12-12 11:01

    It is pretty clear the question was meant to be "what's the difference between lambdas and anonymous delegates?" Out of all the answers here only one person got it right - the main difference is that lambdas can be used to create expression trees as well as delegates.

    You can read more on MSDN: http://msdn.microsoft.com/en-us/library/bb397687.aspx

提交回复
热议问题