Shortcut Navigation:

IPerson String FirstName Quiz

Which of the following statements are correct about an interface used in C#.NET?
  1. An interface can contain properties, methods and events.
  2. The keyword must implement forces implementation of an interface.
  3. Interfaces can be overloaded.
  4. Interfaces can be implemented by a class or a struct.
  5. Enhanced implementations of an interface can be developed without breaking existing code.

Which of the following can implement an interface?
  1. Data
  2. Class
  3. Enum
  4. Structure
  5. Namespace

Which of the following statements is correct about the C#.NET code snippet given below? interface IMyInterface{void fun1();void fun2();}class MyClass: IMyInterface{private int i;void IMyInterface.fun1(){// Some code}}

Which of the following statements is correct about the C#.NET code snippet given below? interface IPerson{String FirstName{get;set;}String LastName{get;set;}void Print();void Stock();int Fun();}

Which of the following is the correct way to implement the interface given below? interface IPerson{String FirstName{get;set;}}