On Thu, Jan 15, 2009 at 3:35 PM, Keith <[email protected]> wrote: > > You definitely don't want to create a GenericInstanceMethod; > constructors are never generic. > > What are you doing with the value on the stack after newobj? If you > want to pass it as an object, then you have to box it, like this:
I'm setting a field using setfld, seems to work fine. I made a function in the base class just to create this int? and return it, so I call it instead of calling the constructor I cannot generate using Cecil and the code works as it should be. If this creation of newobj generates this > newobj instance void [mscorlib]System.Nullable`1<int32>::.ctor > (int32) > then I think that's a bug. > Yes it does, at least here, with SVN rev 122476. I wish I could call the constructor instead of that helper function, if the code is right I'll look around to see if I find the bug. Augusto --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
