On 1/5/09, Daniel Cazzulino <[email protected]> wrote:
> there's no overload to import an Assembly (as an AssemblyReference)
> though...

Right. Traditionally, the different Import methods are importing the
Assembly to AssemblyNameReference by themselves, but I would not mind
exposing such an overload.

>  var addMethod = typeof(List<object>).GetMethod("Add");
>  Assert.NotNull(addMethod);
>  var addToList = asm.MainModule.Import(addMethod);

Hm, I'm not reproducing it with a simple test case. Are you using
Cecil from SVN?

-- 
Jb Evain  <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to