Working with Backgroundworker - Results
Im trying to get the results from a background worker. I am returning a List of process names back to the main thread to display the processes in a listbox. This开发者_如何学C is all well and good , i have the result using e.Result as an object , however this is the problem. I have the object itself and when i watch the statement i can see the list in the result but im struggling to get it back into the list format. I can give e.Result a ToString and it even shows that the type is a list of strings but obviously i cant turn that to the list. Any ideas?
try var list = e.Result as List<string>;
精彩评论