[Mono-devel-list] Getting ConstructorInfo of instanciated generic type
Kamil Skalski
nazgul at nemerle.org
Fri Jan 7 04:14:56 EST 2005
Hi!
I have a question regarding System.Reflection.Emit in context of
generics.
I have a ConstructorInfo instance of generic type, now I want to emit
code
creating new object of this type. But I need to use a method of generic
type
instanciated to some set of type arguments.
The question is how to obtain ConstructorInfo of instanciated version of
generic type. Do I always need to first instanciate type, then lookup
constructor related to the one, which I have?
This doesn't seem to work on MS.NET.
Or maybe there is some method to directly instanciate ConstructorInfo
with
type parameters? BindGenericParameters in MethodBase is for purpose of
generic methods, so this is also not a correct way.
Kamil Skalski
More information about the Mono-devel-list
mailing list