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]> --~--~---------~--~----~------------~-------~--~----~ -- mono-cecil -~----------~----~----~----~------~----~------~--~---
