C# - Cannot append text to control from background threads using Invoke()?

You are waiting for the worker threads to complete before leaving your button1_Click method. This is a problem because your threads can't complete until they are able to run the delegate that calls the AppendText method on that same thread.

The Invoke method runs your delegate synchronously—it waits until the UI thread actually runs it before returning control to the caller. Since the UI thread is waiting for your threads to finish, you get a deadlock.

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