Put it this way. You add and remove methods dynamically to the delegate at runtime. You wanna add a method to a delegate on a certain event, you can do that, and that is handled at runtime.
On Tue, Nov 18, 2008 at 6:50 AM, VIKAS GARG <[EMAIL PROTECTED]>wrote: > the same delegate can be used to call different methods during the runtime > of a program by simply changing the method to which the delegate refers. > Thus, the method that will be invoked by a delegate is not determined at > compile time, but rather at runtime. This is the principal advantage of a > delegate. > > These are the lines which I have read about the delegates. But when > delegate is associated with any method(I mean when any methods reference is > put in delegate) At that time delegate immediately attaches reference of > that method with it. Then why is it written that "the method that will be > invoked by a delegate is not determined at compile time, but rather at > runtime " I am unable to get what writer want to say in above statement. >