Mid OOP

Can you create an object of an interface?

  • No, you cannot instantiate an interface.
  • You can only use it as a reference type.

ICar car = new Car(); // Interface reference

// ICar c = new ICar(); // Not allowed

More from C# Programming Tutorial

All questions for this course