Sending Arguments To Background Worker?
You start it like this: int value = 123; bgw1.RunWorkerAsync(argument: value); // the int will be boxed and then private void worker_DoWork(object sender, DoWorkEventArgs e) { int value = (int) e.Argument; // the ‘argument’ parameter resurfaces here … // and to transport a result back to the main thread double result = 0.1 * value; … Read more