Suppose on pushing a button an object is to be notified, but it is not known until runtime which object should be notified. Which of the following programming constructs should be used to implement this idea?
Which of the following statements is incorrect about delegate?
Which of the following is the correct way to call subroutine MyFun() of the Sample class given below?
class Sample { public void MyFun(int i, Single j) { Console.WriteLine("Welcome to IndiaBIX !"); } }
delegate void del(int i); Sample s = new Sample(); del d = new del(ref s.MyFun); d(10, 1.1f);
delegate void del(int i, Single j); del d; Sample s = new Sample(); d = new del(ref s.MyFun); d(10, 1.1f);
Sample s = new Sample(); delegate void d = new del(ref MyFun); d(10, 1.1f);
delegate void del(int i, Single]); Sample s = new Sample(); del = new delegate(ref MyFun); del(10, 1.1f);
Which of the following statements is incorrect about a delegate?
In which of the following areas are delegates commonly used?
Which of the following statements are correct about a delegate?
Suppose a Generic class called SortObjects is to be made capable of sorting objects of any type (Integer, Single, Byte etc.). Which of the following programming constructs should be used to implement the comparision function?
Which of the following is the necessary condition for implementing delegates?
Which of the following statements are correct about delegates?
With which of the following can the ref keyword be used?
Which of the following statements are correct about the delegate declaration given below?
delegate void del(int i);
Which of the following is the correct way to call the function MyFun() of the Sample class given below?
class Sample { public int MyFun(int i) { Console.WriteLine("Welcome to IndiaBIX.com !" ); return } }
delegate void del(int i); Sample s = new Sample(); deld = new del(ref s.MyFun); d(10);
delegate int del(int i); Sample s = new Sample(.); del = new delegate(ref MyFun); del(10);
Sample s = new Sample(); delegate void del = new delegate(ref MyFun); del(10);
delegate int del(int i); del d; Sample s = new Sample(); d = new del(ref s.MyFun); d(10);
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. */ } }
Please disable the adBlock and continue. Thank you.