Many thanks, that worked like a charm.

In case someone is interested in resulted implementation, the code can
be found here:
http://blog.stevesindelar.cz/mono-cecil-how-to-get-all-base-types-and-interfaces-with-resolved-generic-arguments

On 5 kvÄ›, 14:13, Jb Evain <[email protected]> wrote:
> Hi,
>
> On Thu, May 5, 2011 at 2:09 PM, Steves <[email protected]> wrote:
> > So far so good. However, dictPars contain generic parameters with
> > names '!0' and '!1' instead of TKey and TValue,
> > so I cannot map generic arguments of the Dictionary<string, T>
> > reference, which are string and double (got from T -> double),
> > to IDictionary<TKey, TValue>. Is this by design, or a bug?
>
> This is by design, in the metadata, generic arguments for references
> are only serialized by position, not by name.
>
> > How can I
> > get correct names of the
> > generic parameters in this case?
>
> You have to Resolve the ElementType to get the definition, which will
> have the named generic parameters that you can address by position.
>
> Jb

-- 
--
mono-cecil

Reply via email to