我用C#编译一个a.dll 文件,a.dll文件又引用了第三方提供的b.dll文件。
应用程序app.exe(是一个web service)在调用 a.dll,图示说明如下:
app.exe——>a.dll ——>b.dll;
能不能将b.dll 彻底编译到a.dll里?这样当b.dll发生改变时,我只需要重新编译a.dll,而a.dll里的函数接口不变,
这样我的应用程序app.exe(web service),就不用重新编译发布了。
应用程序app.exe(是一个web service)在调用 a.dll,图示说明如下:
app.exe——>a.dll ——>b.dll;
能不能将b.dll 彻底编译到a.dll里?这样当b.dll发生改变时,我只需要重新编译a.dll,而a.dll里的函数接口不变,
这样我的应用程序app.exe(web service),就不用重新编译发布了。
请说的清楚一点,在下是新手。
System.Reflection.Assembly ass = null;
ass = System.Reflection.Assembly.Load(资源);
Type[] types = ass.GetTypes();
for(int i = 0; i < types.length; i++) {
if(types[i].FullName.Equals("类名")) {
System.Reflection.MethodInfo method = types[i].GetMethod("方法名");
//调用方法
method.Invoke(ass.CreateInstance(types[i].FullName), new object[] {参数})
}
}
资源获取:
工程名.Properties.Resources.资源名.net 2005测试通过(VB库,C#调用)
一个不厚道的做法。
ass = System.Reflection.Assembly.Load(资源);
Type[] types = ass.GetTypes();
for(int i = 0; i < types.length; i++) {
if(types[i].FullName.Equals("类名")) {
System.Reflection.MethodInfo method = types[i].GetMethod("方法名");
//调用方法
method.Invoke(ass.CreateInstance(types[i].FullName), new object[] {参数})
}
}
[color=#FF0000]资源获取:
工程名.Properties.Resources.资源名 这句话是什么意思啊??
工程名为:Hello
导入资源名为:b.dll
ass = System.Reflection.Assembly.Load(Hello.Properties.Resources.b);
至于程序集的话可以通过断点查看types[i].FullName获得