我在控制台应用程序的 Program.cs 中有以下代码
class Program : IView
{
private static ViewPresenter _presenter;
static void Main(string[] args)
{
_presenter = new ViewPresenter(this);
}
}
但我不能传递this
给演示者,因为 Main 方法是static
. 现在我怎么能做这个工作?
我在控制台应用程序的 Program.cs 中有以下代码
class Program : IView
{
private static ViewPresenter _presenter;
static void Main(string[] args)
{
_presenter = new ViewPresenter(this);
}
}
但我不能传递this
给演示者,因为 Main 方法是static
. 现在我怎么能做这个工作?