title: How can release excel object with IDisposeable interface
body: <p>I am writing an excel class and i want to release this unmanaged object automatically.
  I'm using IDisposable pattern and write Dispose methods.
  Example ;</p>
  
  <pre><code>class MSExcel : IDisposable
  {
      ApplicationClass excel;
      bool disposed;
  
      public MSExcel()
      {
           disposed = false;
           excel = new ApplicationClass();
      }
  
      public void Dispose(bool disposing)
      {
          if (!this.disposed)
          {
  
              if (disposing)
              {
  
              }
  
              excel.Quit();                
              disposed = true;
  
          }
      }
  
      public void Dispose()
      {
          Dispose(true);
          GC.SuppressFinalize(this);
      }
  
      ~MSExcel()
      {
         Dispose(false);
      }
  }
  </code></pre>
  
  <p>But i have classical error on exc.Quit(). 
  "COM object that has been separated from its underlying RCW".
  Have any my mistake in code?</p>