动态调用 DLL
[C#] 纯文本查看 复制代码 // 自动更新
SplashScreen.SplashScreen.SetStatus("正在检测更新...");
string updatePath = Application.StartupPath + "\\SimpleUpdater.dll";
if (File.Exists(updatePath))
{
Type type = Assembly.LoadFile(updatePath).GetType(string.Format("{0}.{1}", "FSLib.App.SimpleUpdater", "Updater"));
MethodInfo md = type.GetMethod("CheckUpdateSimple", new Type[] { typeof(IWin32Window), typeof(string[]) });
md.Invoke(null, new object[] { this, new string[] { "更新源1", "更新源2" } });
}
|