Thread1 = new Thread(()=>UpdateLabel(ref label1));
Thread1.Start();
void UpdateLabel(ref Label _label1)
{
lock(_label1)
{
_label1.Text = "Hello World";
}
}
I thought that would make it a resource shared between the GUI thread and Thread1.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhosh Kumar JayaramanPosted Jan 7, 2013, 10:15 AM
I created new winform app. Added one label Label1 in UI.
In code behind
it is working fine
Santhosh Kumar JayaramanPosted Jan 7, 2013, 10:10 AM