无需在设计时知道的类名创建一个对象 [英] Creating an object without knowing the class name at design time
本文介绍了无需在设计时知道的类名创建一个对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用反射,我需要调查用户DLL并在其中创建一个类的对象。
Using reflection, I need to investigate a user DLL and create an object of a class in it.
什么是做的简单的方法?
What is the simple way of doing it?
推荐答案
尝试的 Activator.CreateInstance 。
这篇关于无需在设计时知道的类名创建一个对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文