I have made this program and I dont know how to make it run. I usualy run my methods inside the 2 big methods that I have button1_Click (private void button1_Click(object sender, EventArgs e)) and button2_Click (private void button2_Click(object sender, EventArgs e)).
I write this.Lista(); in the button1_Click method and it gives me the error: No overload for method ‘Lista’ takes 0 arguments.
public void Lista(object sender, EventArgs e)
{
string[] col2 = new string[dataGridView1.Rows.Count];
for (int i = 0; i < dataGridView1.Rows.Count; i++)
if (col2[i] == "Browse From File...")
{
DialogResult result2 = openFileDialog2.ShowDialog();
if (result2 == DialogResult.OK)
{
// filename = openFileDialog1.FileName;
}
}
}
The first line of your code,
public void Lista(object sender, EventArgs e)states that the method expects the parameters in the brackets.So you should remove the parameters from
Lista(object sender, EventArgs e)(because i see you don’t use them in the method anyway)