c#中怎么用反射实现根据需求返回的类名来动态创建对像? 如题目! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public InterfaceClass ReturnInterfaceClass(string strClassName) { Type type = Type.GetType(strClassName); object objInstance1 = System.Activator.CreateInstance(type); Financing.FinancingWinUI.IAddDeleteModify iObj = (InterfaceClass)objInstance1; return iObj; }InterfaceClass为类strClassName继承的接口 16进制字符串如何转换成BigInteger(大数)类型 求C#读xml的方法 菜鸟问题 DllImport 怎样调用包含多个类的dll中的方法 多线程数据重复插入怎么办? F#与c#的区别 vs2005---ToolStrip中button的属性和statusStrip中的statusLable属性 有没有做过web控件,我想问一下web控件的Desinger是咋样做的??有没有人给个例子! 请教上传地址验证的正则表达式写法。在线等,马上揭贴 如何得到网页中的某个图片? 怎样分割日期???急求 向zgke请教关于alpha的问题。
{
Type type = Type.GetType(strClassName);
object objInstance1 = System.Activator.CreateInstance(type);
Financing.FinancingWinUI.IAddDeleteModify iObj = (InterfaceClass)objInstance1;
return iObj;
}
InterfaceClass为类strClassName继承的接口