private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { var ex = new ExampleClass(); ex.Dowork(ReportProgresshandler); }