1
Reply

How do I create a Delegate/Multicast Delegate?

Sapna Malik

Sapna Malik

15y
5.6k
0
Reply

    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!