On Mon, Aug 9, 2010 at 5:24 PM, Timwi <[email protected]> wrote:
> I’m still running into instances of GenericInstanceType which have the
> GenericParameters property set to an empty collection, which I thought
> had been fixed some time ago. Is this a known issue? Is this being
> worked on? Would you like me to try to generate a minimalist testcase
> that produces the bug?

GenericInstanceType don't have parameters, they have arguments. So am
not exactly sure what you're doing, but it doesn't sound good.

If you have:

GenericInstanceType instance = ...;

You can expect that:

instance.GenericParameters.Count == 0

and that

instance.GenericArguments.Count > 0;

If you have:

"class List<T>" in C# (the type declaration),

in Cecil you'll have the TypeDefinition List`1 with one generic parameter.

If you have:

List<T> (an open generic instance) or List<int>, you'll have a
GenericInstanceType with one generic argument.

-- 
Jb Evain  <[email protected]>

-- 
--
mono-cecil

Reply via email to