G
GVN
Hi All,
I recently worked on delegates. But I have a question regarding
Multicast delegates. The scenario is as follows:
I have a delegate myDelegate with object dlgt, and two methods
myMethod1(), and myMethod2().
Using multicast delegates definition I can write as follows to add the
two methods to my multicast delegate:
dlgt += new myDelegate(myMethod1);
dlgt += new myDelegate(myMethod2);
Can I write the same as follows?
I will create a single cast delegate:
dlgt = new myDelegate(myMethod1);
Inside my myMethod1() I will call myMethod2() method.
What is the difference among the above two cases?
Thanks in advance....
I recently worked on delegates. But I have a question regarding
Multicast delegates. The scenario is as follows:
I have a delegate myDelegate with object dlgt, and two methods
myMethod1(), and myMethod2().
Using multicast delegates definition I can write as follows to add the
two methods to my multicast delegate:
dlgt += new myDelegate(myMethod1);
dlgt += new myDelegate(myMethod2);
Can I write the same as follows?
I will create a single cast delegate:
dlgt = new myDelegate(myMethod1);
Inside my myMethod1() I will call myMethod2() method.
What is the difference among the above two cases?
Thanks in advance....