Is there any overhead in the use of anonymous methods?

后端 未结 8 1744
遇见更好的自我
遇见更好的自我 2021-02-15 17:27

I would like to know if there is any overhead incurred through the use of anonymous methods when creating a Background worker.

for example:

public void S         


        
8条回答
  •  一生所求
    2021-02-15 17:37

    Anonymous method can be more efficient because it is always resolved to static method.

    See delegates versus anonymous methods performance peculiarity and Performance of using static methods vs instantiating the class containing the methods.

提交回复
热议问题