that worked like a charm :) I wonder why it doesn't with a fieldref (or where I'd use that instead of the definition...)
thanks! On Mon, Jan 5, 2009 at 9:14 AM, Jb Evain <[email protected]> wrote: > > Hey Daniel, > > On 1/5/09, Daniel Cazzulino <[email protected]> wrote: > > // private IInterceptor __Interceptor; > > var interceptorDef = new FieldDefinition("__Interceptor", > > interceptorRef, Mono.Cecil.FieldAttributes.Private); > > type.Fields.Add(interceptorDef); > > var interceptorField = new FieldReference("__Interceptor", > > type, interceptorRef); > > Why don't you pass the definition directly to ldfld? A FieldDefinition > is a FieldReference, so it works if you use the Definition in the > assembly it's defined in. > > -- > Jb Evain <[email protected]> > > > > -- Daniel Cazzulino | Developer Lead | XML MVP | Clarius Consulting | +1 425.329.3471 --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
