What is a callback?

前端 未结 11 1422
鱼传尺愫
鱼传尺愫 2020-11-28 00:57

What\'s a callback and how is it implemented in C#?

11条回答
  •  日久生厌
    2020-11-28 01:12

    A callback lets you pass executable code as an argument to other code. In C and C++ this is implemented as a function pointer. In .NET you would use a delegate to manage function pointers.

    A few uses include error signaling and controlling whether a function acts or not.

    Wikipedia

提交回复
热议问题