> The return type would be a GenericInstanceType, whose ElementType
> would be a TypeReference to System.Collections.List`1. The first
> GenericArgument of the GenericInstanceType would be a
> GenericParameter. This GenericParameter would be the T, be it defined
> on a type or a method.
>
> --
> Jb Evain  <[email protected]>

That's where I ran into the problem. If I try to import a List<T> into
a module and use it as a type reference, I get a null reference
exception. For example:

var returnType = typeof(List<>);
var returnTypeRef = module.Import(returnType); // This throws a
nullreference exception

...is this the expected behavior for Module.Import(), or am I missing
something here?

(Btw, thanks for the quick response!)
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to