Esempio n. 1
0
        public void DelFunction()
        {
            FunctionsToCallClass obj1 = new FunctionsToCallClass();

            DelegateSignatureExample DExample1 = new DelegateSignatureExample(FunctionsToCallClass.SayHallo);

            DExample1("Hallo) I am your First delegate");


            DelegateSignatureExample DExample2 = new DelegateSignatureExample(obj1.SayHalloNoStatic);

            DExample2("Heyyy, Dont Forget Me. I am not static method and you Second Delagate"); // we call delegate
            DExample2 += FunctionsToCallClass.SayHallo;
            // DExample2("Hey , How Are You ?");
        }
Esempio n. 2
0
 public void DelFunction2(DelegateSignatureExample DCall)
 {
     DCall("Hallo . I am Another Way To Use delegate . ");
 }