Delegates
-
I have been reading from various sources about delegates. The more I read the more I get confused. My question is - What can you do with delegates that you cannot do with just calling the method and not using delegate(s) howsoever? I mean assume that when an event occurs then instead of having a delegate call the method just call the method directly from the event handler. Also if you can send any good link that explains the concept it will be appreciated. Thanks ---------- Venus Patel http://patelsinc.blogspot.com/ A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
-
I have been reading from various sources about delegates. The more I read the more I get confused. My question is - What can you do with delegates that you cannot do with just calling the method and not using delegate(s) howsoever? I mean assume that when an event occurs then instead of having a delegate call the method just call the method directly from the event handler. Also if you can send any good link that explains the concept it will be appreciated. Thanks ---------- Venus Patel http://patelsinc.blogspot.com/ A student knows little about a lot. A professor knows a lot about little. I know everything about nothing.
i find delegates to be the same as function pointers in C/C++. so then we would be able to pass the address/delegate of some function as a parameter some_func(my_delegate); some_func(Delegate a) { a; //would call the function }