I'm working in C# and having trouble passing a variable back to a function thats inside a button click.
So I have a form with a button on it.
private void button3_Click(object sender, EventArgs e)
{
int count = 0;
new EvaluateQuery().RunQuery(_Query,count);
I have a count variable initialized to 0. It passes this value to another function. It serves as the index for an array in my EvaluateQuery function.
Basically, the function does some magic and stops. Once the magic is done, I increment my count variable. The incremented value should be then passed back to my EvaluateQuery function, so if the button is clicked again, it can pass a value of 1 to my function and so on and so on. I'm having trouble passing the incremented value back though.
I am really at a standstill on this. Any help on this topic would be greatly appreciated. Thanks in advance.