【发布时间】:2010-09-02 02:01:32
【问题描述】:
我正在尝试调试一些使用反射加载插件的代码
调试代码如下:
Type a = methodInfo.GetParameters()[0]
.ParameterType.BaseType;
Type b = typeof(MessageContext);
Debug.WriteLine(a.AssemblyQualifiedName);
Debug.WriteLine(b.AssemblyQualifiedName);
Debug.WriteLine(a.Equals(b));
这是它的输出:
OrtzIRC.Common.MessageContext、OrtzIRC.Common、版本=1.0.0.0、文化=中性、PublicKeyToken=null
OrtzIRC.Common.MessageContext,OrtzIRC.Common,版本=1.0.0.0,文化=中性,PublicKeyToken=null
假的
我不明白这两种类型有何不同?
【问题讨论】:
-
.UnderlyingSystemType对他们俩的回报是什么? -
好吧。它们是由不同的类加载器加载的吗?
-
我的意思是,您是否有一个小的独立可运行样本可供我们测试?
标签: c# .net reflection