What I have learned so far is that we can not create an instance of an interface.
interface IFood
{
string Color { get; set; }
}
class Apple : IFood
{
public string Color { get ; set; }
}
IFood food = new IFood(); //this gives compile error
IFood food = new Apple(); //this will work
Upto here everything were okay. But when I work with Microsoft.Office.Interop.Excel
I have seen something like below
Application excel = new Application();// Application is an interface
What am I missing here?