Delegates
diff b/w delegate and Delegate?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manoj BhoirRank #599 · 4K reputationPosted Jul 31, 2015, 7:46 AM EDT
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 MenothRank #118 · 18.4K reputationPosted Jul 31, 2015, 5:52 AM EDT