我试图调用initializecomponent方法,但出现以下错误:
Type 'WindowsFormsApplication1.Form1' already defines a member called 'InitializeComponent' with the same parameter types
代码如下:
public Form1()
{
InitializeComponent();
}
……
private void InitializeComponent()
{
this.Browser = new WebBrowser();
this.panel1 = new Panel();
this.txtNavigate = new TextBox();
this.cmdGo = new Button();
}
}
最佳答案
已经定义了名为initializecomponent的方法,请检查设计器生成的代码。