What is the lifetime of a delegate created by a lambda in C#?

前端 未结 5 1258
忘掉有多难
忘掉有多难 2020-12-08 04:00

Lambdas are nice, as they offer brevity and locality and an extra form of encapsulation. Instead of having to write functions which are only used once you can use a lambda.<

5条回答
  •  执念已碎
    2020-12-08 04:33

    I see Skeet jumped in while I was answering, so I won't belabor that point. One thing I would suggest, to better understand how you are using things, is to get familiar with reverse engineering tools and IL. Take the code sample(s) in question and reverse engineer to IL. It will give you a great amount of information on how the code is working.

提交回复
热议问题