C# Programming - Interfaces
Exercise : Interfaces - General Questions
- Interfaces - General Questions
1.
Which of the following statements is correct about the C#.NET code snippet given below?
interface IMyInterface
{
void fun1();
int fun2();
}
class MyClass: IMyInterface
{
void fun1()
{ }
int IMyInterface.fun2()
{ }
}
2.
Which of the following can be declared in an interface?
- Properties
- Methods
- Enumerations
- Events
- Structures
3.
A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?
4.
Which of the following statements is correct about an interface used in C#.NET?
5.
Which of the following statements is correct about Interfaces used in C#.NET?
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers