mardi 10 mars 2015

I have the following Types:



IMyType,
IMyType<MyClass1>,
IMyType<MyClass2>,
IMyType<string>


Using reflection such as this:



typeof(MyCurrentClass).Assembly.GetTypes().Where(x => x.Name.Contains("IMyType")).ToArray()


I can get an array of Types, but it will only contain IMyType and IMyType<>.


Can I get specifics such as IMyType<MyClass1> using reflection?






Aucun commentaire:

Enregistrer un commentaire