tags:

views:

58

answers:

1

I'm fiddling round with Excel interop at the moment.

Its all going smoothly and I'm disposing of the COM objects and everybody is happy.

What I'm wondering though is how I can reliably kill the COM object if my application crashes out?

Any suggestions welcome, I'm using C#

+2  A: 

Try putting the disposing code on the finally block of your try catch finnally block or try the putting Application.ThreadException event and do the disposing there.

Jojo Sardez