I have an old dll of my application. I have to create new instructions in .NET REFLECTOR using Reflexil v1.7. The problem is where can i find op_Inequality method? I have to write OpCode=call Operand=System.Boolean System.String::op_Inequality(system.string system.string)
我有一个旧应用程序的dll。我必须使用Reflexil v1.7在.NET REFLECTOR中创建新指令。问题是我在哪里可以找到op_Inequality方法?我必须编写OpCode = call Operand = System.Boolean System.String :: op_Inequality(system.string system.string)
1 个解决方案
#1
0
I'm not sure how that should work in reflexil because I don't have an .Net Reflector installation.
我不确定它在reflexil中应该如何工作,因为我没有安装.Net Reflector。
What you're looking at is the op_inequality operator on the String class and that one looks like this:
你正在看的是String类上的op_inequality运算符,它看起来像这样:
public static bool operator !=(string a, string b)
{
return !string.Equals(a, b);
}
In c# the equivalent is
在c#中,等价物是
bool result = (a != b)
As you can see from the decompile instead of op_Inequality I expect you could drop in an virtualcall to Equals
and then negate the branch.
正如您从反编译而不是op_Inequality中看到的那样,我希望您可以将虚拟调用放入Equals,然后取消分支。
IL_0024: ldloc.0 // s
IL_0025: ldloc.1 // v
IL_0026: callvirt System.String.Equals
IL_002D: brtrue.s IL_0038
#1
0
I'm not sure how that should work in reflexil because I don't have an .Net Reflector installation.
我不确定它在reflexil中应该如何工作,因为我没有安装.Net Reflector。
What you're looking at is the op_inequality operator on the String class and that one looks like this:
你正在看的是String类上的op_inequality运算符,它看起来像这样:
public static bool operator !=(string a, string b)
{
return !string.Equals(a, b);
}
In c# the equivalent is
在c#中,等价物是
bool result = (a != b)
As you can see from the decompile instead of op_Inequality I expect you could drop in an virtualcall to Equals
and then negate the branch.
正如您从反编译而不是op_Inequality中看到的那样,我希望您可以将虚拟调用放入Equals,然后取消分支。
IL_0024: ldloc.0 // s
IL_0025: ldloc.1 // v
IL_0026: callvirt System.String.Equals
IL_002D: brtrue.s IL_0038