Why do we need C# delegates

前端 未结 8 647
遥遥无期
遥遥无期 2020-12-22 19:47

I never seem to understand why we need delegates? I know they are immutable reference types that hold reference of a method but why can\'t we just call the method directly,

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-22 20:24

    You can think of them as a construct similar with pointers to functions in C/C++. But they are more than that in C#. Details.

提交回复
热议问题