如何使用Assembly.Gettype?
我已经阅读了Microsoft参考,并且不知道为什么myExcelType始终为NULL。应该加载该dll,因为myAssembly.GetName()工作正常。
Assembly myAssembly = Assembly.LoadFrom(@"D:\Microsoft.Office.Interop.Excel.dll");
Type myExcelType = myAssembly.GetType("Microsoft.Office.Interop.Excel.ApplicationClass");
object myExcelObj = Activator.CreateInstance(myExcelType);