Closed andrewshulgin closed 7 years ago
How about making methodGetOperand<T>(target)
,
p.GetOperand<int>(target);
Another version could be
GetOperand<T>(target) : where T : OpCode
p.GetOperand<OpCode.LdcI4>(target);
Or just
object GetOperand(target);
and you cast that object yourself?
Because current pull request only covers one case.
For now, I will merge the PR. Either make a new PR with @SlowLogicBoy 's recommendation or wait until I update it.
Example:
Sample Program:
dnPatch Usage:
dnSpy Screenshots: