[Mono-dev] Porting mcs to IKVM.Reflection

Jeroen Frijters jeroen at sumatra.nl
Fri May 7 05:38:29 EDT 2010


> This code will work on both of Mono and MS.NET, but will fail without
> the WriteGenericSignature patch:
[...]
> Although using a generic type definition directly makes little sense,
> neither makes using tb.MakeGenericType(tb.GetGenericArguments()) much
> more sense, since you still can use the latter in a context that has
> fewer generic arguments.

Ugh. Thanks. It turns out that ReferenceEquals(typeof(Foo<>).MakeGenericType(typeof(Foo<>).GetGenericArguments()), typeof(Foo<>)) is true and that means that I need to do some fixing...

I guess I had it coming that a major flaw in my understanding would come to light after bragging I know so much about Reflection ;-)

Regards,
Jeroen



More information about the Mono-devel-list mailing list