Sapna Malik
How do I create a Delegate/Multicast Delegate?
By Sapna Malik in ASP.NET on Sep 16 2009
  • Partap Tanwar
    Oct, 2009 6

    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's name.
     For example, let's use System.Threading.ThreadStart: Foo MyFoo = new Foo();
    ThreadStart delegates = new ThreadStart(MyFoo.Baz);
    This means that delegates can invoke static class methods and instance methods with the exact same syntax!

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS