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

后端 未结 17 1369
小蘑菇
小蘑菇 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 10:53

    I don't have a ton of experience with this, but the way I would describe it is that a delegate is a wrapper around any function, whereas a lambda expression is itself an anonymous function.

提交回复
热议问题