passing parameter to dowork?
- by safi
How can i Pass parameter to background_DoWork?
public void bgw1_DoWork(Object sender, DoWorkEventArgs e)
{
make_zip_file argumentest = e.Argument as make_zip_file;
Thread.Sleep(100);
argumentest.return_path = argumentest.Makezipfile(files, IsOriginal);
e.Result = argumentest;
}
i need to pass files,isOrginal parameter...?
i am calling this method:
public string run_async()
{
bgw1.DoWork += bgw1_DoWork;
bgw1.RunWorkerCompleted += bgw1_RunWorkerCompleted;
make_zip_file mzf2 = new make_zip_file();
bgw1.RunWorkerAsync();
return return_path;
}