Examveda

Choose the correct way to call subroutine fun() of the sample class?
class a
{
    public void x(int p, double k)
    {
        Console.WriteLine("k : csharp!");
    }
}

A.

delegate void del(int i);
x s = new x();
del d = new del(ref s.x);
d(8, 2.2f);

B.

delegate void del(int p,  double k);
del d;
x s = new x();
d = new del(ref s.x);
d(8, 2.2f);

C.

x s = new x();
delegate void d = new del(ref x);
d(8, 2.2f);

D. all of the mentioned

Answer: Option B


This Question Belongs to C Sharp Programming >> Networking In C Sharp

Join The Discussion

Related Questions on Networking in C Sharp

What is the difference between TCP and UDP in networking?

A. TCP provides reliable, connection-oriented communication, while UDP provides unreliable, connectionless communication

B. TCP provides unreliable, connectionless communication, while UDP provides reliable, connection-oriented communication

C. TCP is faster than UDP

D. UDP is more secure than TCP