C# Programming - Delegates
Exercise : Delegates - General Questions
- Delegates - General Questions
1.
Which of the following statements is incorrect about delegate?
2.
In which of the following areas are delegates commonly used?
- Remoting
- Serialization
- File Input/Output
- Multithreading
- Event handling
3.
Which of the following is the necessary condition for implementing delegates?
4.
Which of the following statements are correct about the delegate declaration given below?
delegate void del(int i);
- On declaring the delegate a class called del will get created.
- The signature of del need not be same as the signature of the method that we intend to call using it.
- The del class will be derived from the MulticastDelegate class.
- The method that can be called using del should not be a static method.
- The del class will contain a one-argument constructor and an lnvoke() method.
5.
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 0;
}
}
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers