Using MEF, I can create and load this type:
var view = Container.GetExportedValue<MyView>();
Now I want to do the following:
Type t = typeof(MyView);
var view = Container.GetExportedValue<t>();
(of course, the type may contain something other than MyView).
This is not possible if using generics GetExportedValue <> - is there any other way to achieve this?
source
share