> Your best chance here is, as you did, to write the C# equivalent of > what you want to generate, then dump the Cecil structure that you read > from this equivalent, so that you can generate the same. > > In this case, a MemberReference with the good declaring type. > > -- > Jb Evain <[EMAIL PROTECTED]>
So how do I go about using the member reference instead of the fielddefinition, using Cecil? Is it something like: IL.Emit(OpCodes.Ldfld, memberReference); The question is, how do I initialize the member reference? Do I just cast the FieldDefinition down to a member reference and emit it that way? Or is there something that I'm missing here? Btw, thanks for the quick reply! --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
