Importing types from non referenced assembly using MEF
I have this peice of code:
IDocumentParent parent;
var typeofParent = Type.GetType("cus开发者_如何学编程tom.type", true, true);
The problem is that I want to create the type from an assembly that is not referenced.
I do not want to go down the Assembly.Load path, so I was wondering if MEF would be a good solution to this problem?
The problem is that I want to create the type from an assembly that is not referenced. I do not want to go down the Assembly.Load path, so I was wondering if MEF would be a good solution to this problem?
Yes. Take a look at the MEF programming guide.
精彩评论