Jimmy <be****@gmail.com> wrote:
ok but why would you use this? what is the advantage of a delegate? when
would you use it?
For event handlers, or whenever you want a function pointer, basically.
You could think of it as a "one method interface" if you want, but you
don't need to explicitly implement it, or you can pseudo-implement it
several times in the same class (just by giving several different
methods the same signature as the delegate). You can also build
delegate instances from static methods.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too