Sunday, March 29, 2015

How do I create a Delegate/MulticastDelegate?

Question:How do I create a Delegate/MulticastDelegate??

Answer: </P><P align=justify>C# requires only a single parameter for delegates: the method address. Unlike other languages, where the programmer must specify an object reference and the method to invoke, C# can infer both pieces of information by just specifying the method&#39;s name. For example, let&#39;s use </P><P align=justify>System.Threading.ThreadStart: Foo MyFoo = new Foo();</P><P align=justify>ThreadStart del = new ThreadStart(MyFoo.Baz);</P><P align=justify>This means that delegates can invoke static class methods and instance methods with the exact same syntax!

Tags:Interview Questions, Microsoft, C#,

Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.



Sponsor Advertisement



Bulk SMS Sending Software

SMS Management System Software

This software used to Send bulk SMS (short text messages) from your computer and assists you to rapidly connect with your customers and staff, communicate with them easily and cheaply, using latest technology that help to generate bulk SMS on just one click to all the database....

No comments:

Post a Comment