c# - How to correctly use BackgroundWorker to call static method with arguments -
i see backgroundworker class able pass upper process progress information. have static method:
myclass.mymethod(string, string) // work progress need study
how can utilize such method calling function or process homecoming backgroundworker progress info example:
backgroundworker.reportprogress(percent, "stage n 1...");
?
first set workerreportsprogress
property true.
than add together event handler progress changed event , @ to the lowest degree add together code new handler.
for example:
private void backgroundworker1_progresschanged(object sender, progresschangedeventargs e) { var percent = e.progresspercentage; }
but @ least: background worker class more or less obsolete ( windows statement ) utilize new task class
c# backgroundworker background-process
No comments:
Post a Comment