Delegates
diff b/w delegate and Delegate?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manoj BhoirPosted Jul 31, 2015, 11:46 AM
Most languages implement a delegate keyword, and compilers for those languages are able to derive from the MulticastDelegate class; therefore, users should use the delegate keyword provided by the language.
The delegate keyword is for the compiler to do some magic for you. When you declare a new delegate with a custom signature,
So now when you call
delObject(args)- the compiler translates that todelObject.Invoke(args)The Delegate base class provides some functionality such as
The C# compiler forbids you from deriving from Delegate explcitly in your code.. you have to use the delegate keyword.
Rajeesh MenothPosted Jul 31, 2015, 9:52 AM