My code is as follows, as well as the error message that appears:
private void button1_Click(object sender, EventArgs e)
{
int loopStart;
int loopEnd;
int answer = 0;
loopStart = int.Parse(textBox1.Text);
loopEnd = int.Parse(textBox2.Text);
for (int i = loopStart; i > loopEnd; i++)
{
answer = answer + i;
listBox1.Items.Add(answer.ToString());
}
When I run it I get this:
Error 1 'Loops.Form1' does not contain a definition for 'listBox1_SelectedIndexChanged' and no extension method 'listBox1_SelectedIndexChanged' accepting a first argument of type 'Loops.Form1' could be found (are you missing a using directive or an assembly reference?)
I really have no idea what's happening I will attach
Loops.zip 36.93K
22 downloads my program to this post. Any help is greatly appreciated 






