ElektroKill

Results 77 comments of ElektroKill

> I don't agree it's strange behavior, why there's `ImportDeclaringType` in dnlib many years ago? Since it's expected behavior rather than strange behavior. DynamicMethodBodyReader can generate such code more than...

> ```cs > var mi = typeof(My).GetMethod("Test"); > var md = (MethodDef)module.ResolveToken(mi.MetadataToken); > var dm = DynamicMethodHelper.ConvertFrom(mi); > ``` > > There's an issue, in my sample, `mi` and `dm`...

This is an unrealistic scenario. In this case, the method returned by `var dm = DynamicMethodBuilder.Build(null);` is not invocable and will create an exception. This means this dynamic method object...

Furthermore, the dynamic method created and invoked by `Test(1);` is actually valid as it does contain proper instantiation and thus does not throw at runtime. Th inclusion of it here...

> > I think you are stretching this problem out and creating unreasonable and unrealistic scenarios to try to show that a fix you wanted is suddenly not necessary because...

> But is this correct? Is the JIT silently switching `>` to `!=`? Or is actually comparing the numeric values of the object pointers? (which would only have reliable runtime...

> It's probably an obfuscator hiding nulls in static fields? > > Am I guessing correctly that `Class13.image_0` is always `null`? This is actually something I have not considered! It...