开发者

.NET: How do I determine if an object is a COM object?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜