小编Jov*_*ita的帖子

如何在C#中的System.Type中返回System .__ COMObject的类型

我正在做一个程序,我想做一个反射,但是为此,我需要一个Type类的Object,对吗?使用.GetProperties()方法...所以我尝试了这个:

Type typeName = simObjects.getType();

但是.GetType()返回“ System .__ COMObject”。这没有帮助。.typeof()也会发生同样的情况。我搜索并找到了另一个代码,这个代码:

Type typeName = (Type)Microsoft.VisualBasic.Information.TypeName(simObjects);

但是此方法返回一个String,而我在System.Type中需要它,请问有什么帮助吗?

c# reflection system.type comobject gettype

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

c# ×1

comobject ×1

gettype ×1

reflection ×1

system.type ×1