Reputation: 70307
How do I determine if an object is a COM object? I need to call Marshal.FinalReleaseComObject on all COM objects in an array of type Object.
Upvotes: 7
Views: 309
Reputation: 68687
typeof(myObject).IsCOMObject
or
instanceOfMyObject.GetType().IsCOMObject
Upvotes: 5