Search code examples
c#callback

What is a callback?


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


Solution

  • In computer programming, a callback is executable code that is passed as an argument to other code.

    Wikipedia: Callback (computer science)

    C# has delegates for that purpose. They are heavily used with events, as an event can automatically invoke a number of attached delegates (event handlers).