How to determine if an object is a COM object? I need to call Marshal.FinalReleaseComObject for all COM objects in an array of type Object.
Marshal.IsComObject
typeof(myObject).IsCOMObject
or
instanceOfMyObject.GetType().IsCOMObject
You can call GetType () and check the IsCOMObject property