Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Search Your Question

Monday, May 5, 2008

What is a delegate, why should you use it and how do you call it ?

Delegate lets some other code call your function without needing to know where your function is actually located.
All events in .NET actually use delegates in the background to wireup events. Events are really just a modified form of a delegate.
We can say that a delegate is a class that has a signature and holds references to methods.

A sample delegate definition can be .

No comments:

Archives