Passing object from backgroundworker to main thread?

In DoWork, set e. Result to your object. In the WorkerCompleted you can get that object back out... it will once again be e.

Result of type object. Just cast it to the object it was. The WorkerCompleted should be on the correct thread.

Use your WorkerCompleted event handler to make changes the UI, it runs on the right thread. All you have to do is pass the string to the event handler. Which is what DoWorkEventArgs.

Result was designed to do. You'll retrieve it in the event handler from e.Result. Thus.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions