How do I de开发者_Python百科termine if an object is a COM object? I need to call Marshal.FinalReleaseComObject on all COM objects in an array of type Object.
Marshal.IsComObject
typeof(myObject).IsCOMObject
or
instanceOfMyObject.GetType().IsCOMObject
You can call GetType() and inspect the IsCOMObject property
精彩评论