Using delegates in C#

前端 未结 5 590
深忆病人
深忆病人 2021-01-30 04:50

In C# language and .NET framework, could you help me with understanding delegates? I was trying to check some code, and found that the results I received were unexpected for me.

5条回答
  •  Happy的楠姐
    2021-01-30 05:30

    My guess is because int are passed by values not references, and for that reason when creating the delegate, it's a delegate to the method ToString of the current value of "I" (0).

提交回复
热议问题