none
How we can implement call back in C#. RRS feed

Answers

  • I think that any delegate and event, including Action<…> and Func<…>, or a class with virtual function, can be used for a range of callbacks. It depends on what kind of callbacks you are interested in.

    Thursday, February 26, 2015 1:09 PM
  • You should look into delegates:

    Delegates (C# Programming Guide): https://msdn.microsoft.com/en-us/library/ms173171(v=vs.120).aspx

    A callback is actually a "pointer" to some method or other code that can passed as an argument to a method and a delegate in C# is a type that represents a reference to a method with a particular parameter list and return type.


    Please remember to helpful posts as answer to close your threads and then start a new thread if you have a new question.

     

    Thursday, February 26, 2015 4:36 PM

All replies

  • I think that any delegate and event, including Action<…> and Func<…>, or a class with virtual function, can be used for a range of callbacks. It depends on what kind of callbacks you are interested in.

    Thursday, February 26, 2015 1:09 PM
  • You should look into delegates:

    Delegates (C# Programming Guide): https://msdn.microsoft.com/en-us/library/ms173171(v=vs.120).aspx

    A callback is actually a "pointer" to some method or other code that can passed as an argument to a method and a delegate in C# is a type that represents a reference to a method with a particular parameter list and return type.


    Please remember to helpful posts as answer to close your threads and then start a new thread if you have a new question.

     

    Thursday, February 26, 2015 4:36 PM