Home / C# Programming / Delegates :: Discussion

Discussion :: Delegates

  1. Which of the following are the correct ways to declare a delegate for calling the function func() defined in the sample class given below?

    class Sample 
    {
         public int func(int i, Single j) 
         {      
               /* Add code here. */ 
         }
     }

     

  2. A.

    delegate d(int i, Single j);

    B.

    delegate void d(int, Single);

    C.

    delegate int d(int i, Single j);

    D.

    delegate void (int i, Single j);

    E.

    delegate int sample.func(int i, Single j);

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment