Release Excel Object In My Destructor
- by Murat
Hi all,
I'm writing a Excel class using Microsoft.Interropt.Excel DLL.
I finish all function but I have an error in my Destructor.
I Want to save all changes to my file and I want to release all source. I want to all of them in my destructor.
But In my destructor, Excel.ApplicationClass, Workbook and Worksheet objects are fill by an Exception which have message "COM object that has been separated from its underlying RCW cannot be used."
So I can't save nothing, close nothing because i can't access workbook or worksheet object.
Can't I access the class private members in Destructor?