On Mon, Dec 6, 2010 at 5:34 PM, impworks <[email protected]> wrote:
> Another question arose though, how do I work with a
> GenericInstanceType?
> If I want to create a TypeReference to List<Someclass>, do I create a
> GenericInstanceType from List or from Someclass?

The following code implies that both list_t and Someclass are defined
in another module, and thus, require to be imported.

ModuleDefinition module = ...;
var list_t = module.Import (list_t_definition);
var some_class = module.Import (some_class_definition);

var list_some_class = new GenericInstanceType (list_t);
list_come_class.GenericArguments.Add (some_class);

Jb

-- 
--
mono-cecil

Reply via email to