我正在尝试调用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的方法定义了,请检查设计器生成的代码。
用部分改变私钥字:
partial void InitializeComponent()
这样你就可以拥有许多同名的会员。