开发者

Importing types from non referenced assembly using MEF

开发者 https://www.devze.com 2023-01-29 10:28 出处:网络
I have this peice of code: IDocumentParent parent; var typeofParent = Type.GetType(\"cus开发者_如何学编程tom.type\", true, true);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消