C# DLL嵌套调用时,需要以被修改的DLL作为最下层,从下往上地重新生成所有DLL才可生效。
DLL1(最下层)代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary1
{
public class Class1
{
public void ConsoleWriteLineSomething()
{
Console.WriteLine("A");
}
}
}
DLL2(中间层)代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary2
{
public class Class1
{
public void ConsoleWriteLineSomething()
{
ClassLibrary1.Class1 class1 = new ClassLibrary1.Class1();
class1.ConsoleWriteLineSomething();
}
}
}
应用程序代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Ta

最低0.47元/天 解锁文章
3691

被折叠的 条评论
为什么被折叠?



