相关疑难解决方法(0)

应该是两种不相等的类型

我正在尝试调试一些使用反射来加载插件的代码

这是调试代码:

Type a = methodInfo.GetParameters()[0]
    .ParameterType.BaseType;
Type b = typeof(MessageContext);
Debug.WriteLine(a.AssemblyQualifiedName);
Debug.WriteLine(b.AssemblyQualifiedName);
Debug.WriteLine(a.Equals(b));
Run Code Online (Sandbox Code Playgroud)

这是它的输出:

OrtzIRC.Common.MessageContext,OrtzIRC.Common,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null
OrtzIRC.Common.MessageContext,OrtzIRC.Common,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null
False

我不明白是什么让这两种类型不同?

.net c# reflection

16
推荐指数
1
解决办法
2407
查看次数

标签 统计

.net ×1

c# ×1

reflection ×1