Something about delegates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used delegates recently, It seemed the delegates was like function_call
very much, and we couldn't use delegates to mimic the system events( ex,
button_click), so didn't think the delegates worthy to use in our application.

I doubt what's the purpose the delegates?
 
hangaround said:
I used delegates recently, It seemed the delegates was like function_call
very much, and we couldn't use delegates to mimic the system events( ex,
button_click), so didn't think the delegates worthy to use in our application.

I doubt what's the purpose the delegates?

Delegates provide a way of allowing one piece of code to execute an
arbitrary method with the appropriate signature, without knowing ahead
of time what the method will be. They're very similar to function
pointers in C.

See http://www.pobox.com/~skeet/csharp/events.html for more about them
(and events).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top