//程序集引用方式 int int111 = 0; string str111 = ""; bool ret1 = new ClsITestData().GetRtf("Debug_Pas", "022_0714_1654_55", out string rtf, ref int111, ref str111); string msg1 = rtf; //COM调用 string str = ""; Type type = Type.GetTypeFromProgID("ProgIDxxxxxx"); //创建COM类型 object obj = Activator.CreateInstance(type); //创建类型实例 object[] invokeParas = new object[] { "Debug_Pas", "022_0714_1654_55", str, null, null }; //参数对象数组 bool ret2 = (bool)type.GetMethod("GetRtf").Invoke(obj, invokeParas); //Invoke执行 string msg2 = invokeParas[2].ToString(); //取参数值
标签:string,C#,ref,object,bool,type,out From: https://www.cnblogs.com/leavind/p/17565423.html