我是C#的新手,正在尝试学习如何使用DLL。我正在尝试将我的对象包装在一个DLL中,然后在我的程序中使用。
public class Foo // its in the DLL
{
public void Bar()
{
SomeMethodInMyProgram();
}
}
我试图将它打包成DLL文件,但是我无法这样做,因为编译器不知道SomeMethodInMyProgram()是什么。
我想这样使用它:
class Program // my program, using DLL
{
static void Main(string[] args)
{
Foo test = new Foo();
test.Bar();
}
}
mpsc
是什么,它与OP问题中的Foo
有什么关系? - phil294