By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,241 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Something about delegates

P: n/a
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?
Sep 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
hangaround <ha********@discussions.microsoft.comwrote:
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).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Sep 25 '06 #2

P: n/a


"Jon Skeet [C# MVP]" wrote:
hangaround <ha********@discussions.microsoft.comwrote:
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).

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Thanks a lot
Nov 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.