I am using a for loop to keep adding items to an array by keep pressing the button, i call it btnEnter, after input some data. something like
double[] inputarr = new double[10];
for (int i = 0; i < inputarr.Length; i++)
{
inputarr[i] = Double.Parse(txtAmount.Text);
}
I want to jump out from the loop and perform something by clicking another button. Can button_click() do the job for me? like
for (int i = 0; i < inputarr.Length; i++)
{
inputarr[i] = Double.Parse(txtAmount.Text);
if (btnStop_Click() == true)
{
break;
}
}
how to make this work? can anyone help me with this?