wuyong

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

            Assembly ass=Assembly.LoadFrom("ReflectionStudy.exe");
            Type t = ass.GetType("ReflectionStudy.Form1");
            object obj = Activator.CreateInstance(t);
多参数初始化

                Assembly assembly = Assembly.LoadFrom("GUI.exe");
                Type type 
= assembly.GetType("GUI.V4A_TP_DataExchange.UploadDataUnitClient_" + cmbUploadDataUnits.SelectedItem.ToString());
                UploadDataUnitClient[] UploadDataUnitClientSingle
=new UploadDataUnitClient[1];
                Object[] objPara 
= new Object[] { _sqlConnection};
                Object obj 
= Activator.CreateInstance(type,objPara);

                UploadDataUnitClientSingle[
0]= (UploadDataUnitClient)obj;
                _DataExchangeBase.UploadDataUnitClientArray 
= UploadDataUnitClientSingle;
posted on 2006-12-04 14:12  吴勇  阅读(215)  评论(0编辑  收藏  举报