TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
D L
NA
11
17.4k
Cross thread Exception
Jan 7 2013 9:25 AM
I don't understand why I get a cross threading exception on this. Can someone plz explain?
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.
Reply
Answers (
2
)
Create windows multiple form using switch case in C#.Net
How to Shuffle a list in C#