Question is:
When i do the same task using Thread and BW - let say, im reading a long file into a string.
string contentsOfFile = streamReadInstance.ReadToEnd();
Now, i know that we cannot use different thread than UI thread to update a Winform so why when i use the thread instance i get the error but when i do
..... BW_RunWorkerCompleted....
{
richtextboxInstance.Text = contentsOfFile;
}
its fine. Is the BackgroundWorker a "special kind of thread" designed to make working with winforms easier so that we dont have to bother with Invokerequired etc.
Thanks for any explanation.

New Topic/Question
Reply



MultiQuote







|