namespace Akadia.BasicDelegate { // Declaration public delegate void SimpleDelegate(); class TestDelegate { public static void MyFunc() { Console.WriteLine("I was called by delegate ..."); } public static void Main() { // Instantiation SimpleDelegate simpleDelegate = new SimpleDelegate(MyFunc); // Invocation simpleDelegate(); it's the object of delegate. } } } objectname.Eventname += new objectname.delegatename(functionname()); in this we are calling events by creating an object of that particular class providing events but when we attaching delegates we are not using the object name or we cannot use object name, instead we are using class name of that particular delegate provided . Delegate is neither meant to do any action nor to persist a value. so there is no need to access the delegate by an object. And we can even declare the delegate outside of the class. There is no significant in declaring the dele...
ERP Project Management,Asp.net,PL SQL Tips for error resolution,Research,Software Errors and solution,SQL 2014,2012,2008,Procedural language,SP,Power BI,excel macro ,Musical notations,Business software,Degree, diploma related informations.