Hi, The operand of a stfld opcode must be a field. Unless the assemly has been obfuscated. Some obfuscators are known to inject meaningless and broken code.
It's easy to see what in the operand, just call ToString on it to diagnose. Jb On Tue, Sep 25, 2012 at 5:17 AM, Greg Nehus <[email protected]> wrote: > In a project that I am working with, I am redirecting a call to a field to a > call to a base class field (a base class that was dynamically added). In > this particular case, a set to a field's stfld cannot be cast to a > FieldReference, but only to a MemberReference. Is there a reason for this? > > Thank you, > Greg > > -- > -- > mono-cecil -- -- mono-cecil
