Already defines a member called 'InitializeComponent' with the same parameter types
16,980
There's already a method called InitializeComponent defined, check the designer generated code.
Author by
Jay
Updated on June 05, 2022Comments
-
Jay almost 2 years
I am trying to call the InitializeComponent method, although I get the following error:
Type 'WindowsFormsApplication1.Form1' already defines a member called 'InitializeComponent' with the same parameter types
Code as follows:
public Form1() { InitializeComponent(); }
............
private void InitializeComponent() { this.Browser = new WebBrowser(); this.panel1 = new Panel(); this.txtNavigate = new TextBox(); this.cmdGo = new Button(); } }