我正在尝试调试一些使用反射来加载插件的代码
这是调试代码:
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
我不明白是什么让这两种类型不同?