c# e.userstate to string code example
Example: c# e.userstate to string
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
backgroundWorker1.ReportProgress(100, new String[] { "Hello",
"World" });
}
private void backgroundWorker1_ProgressChanged(object sender,
ProgressChangedEventArgs e)
{
String[] str = (String[])e.UserState;
MessageBox.Show("Percentage: " + e.ProgressPercentage + ", " +
str[0] + " " + str[1]);
}