| http://www.w3.org/ns/prov#value | - display() of class P to delegate delmethod() using new operator // you can use both ways to assign the delagate delmethod del2 = new delmethod(P.display); P obj = new P(); // here first we have create instance of class P and assigned the method print() to the delegate i.e. delegate with class delmethod del3 = obj.print; del1(); del2(); del3(); Console.ReadLine(); } } } The following is a sample to
|