gpt4 book ai didi

c# - 已经用相同的参数类型定义了一个名为 'InitializeComponent' 的成员

转载 作者:可可西里 更新时间:2023-11-01 09:31:15 24 4
gpt4 key购买 nike

我正在尝试调用 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 的方法,检查设计器生成的代码。

关于c# - 已经用相同的参数类型定义了一个名为 'InitializeComponent' 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6717757/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com