title: Creating instance of interface in C#
body: <p>I'm working with MS Excel interop in C# and I don't understand how this particular line of code works:</p>
  
  <pre><code>var excel = new Microsoft.Office.Interop.Excel.Application();
  </code></pre>
  
  <p>where Microsoft.Office.Interop.Excel.Application is an INTERFACE defined as:</p>
  
  <pre><code>[Guid("000208D5-0000-0000-C000-000000000046")]
  [CoClass(typeof(ApplicationClass))]
  public interface Application : _Application, AppEvents_Event
  {
  }
  </code></pre>
  
  <p>I'm thinking that some magic happens when the interface is decorated with a CoClass attribute, but still how is it possible that we can create an instance of an interface with a new keyword? Shouldn't it generate a compile time error?</p>