Sunday, August 16, 2009

Understanding Delegates

Some of my definitions of a delegate....
1) Delegates are similar to function pointers in c#.
2) Delegate contains an invocation list (or chain). When the delegate is called, each method in the chain gets executed.
3) Delegates are immutable just as string
4) When you say x += y, where x and y are delegates, this is equivalent to

x = x + y or
x = Delegate.combine(x,y);

No comments:

Post a Comment