Using a lambda expression versus a private method

前端 未结 7 1144
北海茫月
北海茫月 2021-02-02 13:42

I read an answer to a question on Stack Overflow that contained the following suggested code:

Action logAndEat = ex => 
{  
    // Log Error          


        
7条回答
  •  醉酒成梦
    2021-02-02 14:30

    Variables captured by logAndEat would otherwise be parameters to the LogAndEat method. You could consider it a form of currying.

提交回复
热议问题