Hey Gabriel,

On Tue, Jun 1, 2010 at 12:33 PM, Gabriel Kevorkian
<[email protected]> wrote:
> Sorry for bothering you again but I think it would be great if the
> support for specifying a generic context were actually extended to the
> overload of ModuleDefinition.Import() taking in a MethodReference as
> argument.

When importing a MethodReference, its DeclaringType becomes the
context, so am not exactly sure.

> using .net reflection on a generic type e.g.
>
> public class A<TParam>
> {
>   public TParam L { get { return null; } }
> }
>
> to:
> - retrieve a type defined in terms of a generic parameter,
> - use the thus retrieved type to instantiate another generic type, say
> List<> ,
> - get the constructor so as to be able to perform a new of
> List<TParam> within A<TParam>

Could you post code for those usages, it would be much easier to understand.

Thanks!

-- 
Jb Evain  <[email protected]>

-- 
--
mono-cecil

Reply via email to