我对 C# 很陌生,我的作业有问题。对于某些按钮的单击事件,我有以下内容。对于单击事件,我想调用一个名为 functionA 的函数,其参数名为 parameterB,一个双精度类型数组。附加参数导致错误。我这样做的正确方法是什么?
private void button1_Click(object sender, EventArgs e, double [] parameterB)
{
functionA(parameterB);
}
在 Designer.cs 的相应部分
this.button1.Location = new System.Drawing.Point(386, 309);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(174, 27);
this.button1.TabIndex = 25;
this.button1.Text = "Calculate Final Grade";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);