Choose the correct way to call subroutine fun() of the sample class? [code] class a { public void x(int p, double k) {

Đinh Yến

New member
Choose the correct way to call subroutine fun() of the sample class?
Code:
class a
{
    public void x(int p, double k)
    {
        Console.WriteLine("k : csharp!");
    }
}
A.
Code:
   delegate void del(int i);
   x s = new x();
   del d = new del(ref s.x);
   d(8, 2.2f);
B.
Code:
   delegate void del(int p,  double k);
   del d;
   x s = new x();
   d = new del(ref s.x);
   d(8, 2.2f);
C.
Code:
   x s = new x();
   delegate void d = new del(ref x);
   d(8, 2.2f);
D. all of the mentioned
 

Tìm kiếm

Back
Top