A
abhimanyu
I have a method Marshal.IsComObject(...) that returns TRUE if an
object is a COM object.
I have an object of Excel.Worksheet that I released using
Marshal.ReleaseComObject(...). I want to iterate over a collection of
Excel.Worksheet and find out which is disposed.
Currently the workaround for me (bad one) is
try
{
string name = worksheet.Name;
}
catch(Exception e)
{
// this one was release as I cannot access it
worksheet = null;
}
Is there any other method through which I can check for a VALID(not
released) COM object?
Regards,
object is a COM object.
I have an object of Excel.Worksheet that I released using
Marshal.ReleaseComObject(...). I want to iterate over a collection of
Excel.Worksheet and find out which is disposed.
Currently the workaround for me (bad one) is
try
{
string name = worksheet.Name;
}
catch(Exception e)
{
// this one was release as I cannot access it
worksheet = null;
}
Is there any other method through which I can check for a VALID(not
released) COM object?
Regards,