Delegates

Q1:
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. */
    }
}

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);

ANS:C - delegate int d(int i, Single j);

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.