I have a Backrgound Worker which won't report progress. I need to get an exact value, not a percentage. I'm not sure how to code the progress changed event. I have set the WorkReportsProgress property to true. I'm still relatively new to C# so excuse my poor knowledge.
private void BKGWork_DoWork(object sender, DoWorkEventArgs e)
BackgroundWorker worker = sender as BackgroundWorker;
for (int i = 1; i <= 20; i++)
private void BKGWork_ProgressChanged(object sender, ProgressChangedEventArgs e)
//not sure how to get the exact value of i and compare it to see which loop the background worker is in.
worker.ReportProgress(0,i); to pass your explicit value as a user state parameter. Use can access this in
e.UserState casting it to an int