R
Raith
Ok I'm still very new to C# and I've been searching around and getting
myself all confused so gave up and am posting here.
Vastly simplified but I have a form with some tick boxes on it,
clicking on ok populates an array with the values selected and runs a
process passing the array, a bit like below...
public void process(string[] valuesArray)
{
// Do stuff that takes a while here.
}
private void button1_Click(object sender, EventArgs e)
{
string[] valuesArray = new string[3];
valuesArray = {"test1", "test2", "test3"};
process(valuesArray);
}
This is fine but locks up the form until it's finished, so I thought
I'd do the processing in a new thread... Only thing is I don't know how
to pass the array to the process when starting a new thread.
Any help appreciated, thanks in advance!
myself all confused so gave up and am posting here.
Vastly simplified but I have a form with some tick boxes on it,
clicking on ok populates an array with the values selected and runs a
process passing the array, a bit like below...
public void process(string[] valuesArray)
{
// Do stuff that takes a while here.
}
private void button1_Click(object sender, EventArgs e)
{
string[] valuesArray = new string[3];
valuesArray = {"test1", "test2", "test3"};
process(valuesArray);
}
This is fine but locks up the form until it's finished, so I thought
I'd do the processing in a new thread... Only thing is I don't know how
to pass the array to the process when starting a new thread.
Any help appreciated, thanks in advance!