You can create an extension method for BackgroundWorker as follows:
public static class BackgroundWorkerExt { public static void ReportProgress(this BackgroundWorker self, object state) { const int DUMMY_PROGRESS = 0; self.ReportProgress(DUMMY_PROGRESS, state); } }
Then you can do the following (as long as the parameter is NOT int, otherwise normal ReportProgress(int) will be called):
_backgroundWorker.ReportProgress("Test");
source share