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.3k
Sharing data between threads of different methods
Apr 10 2013 2:31 PM
I am curious about the best way to share data between threads that aren't based on the same method.
For example, if I want to share the same string(by reference) between 2 threads:
Main()
{
string shareme;
Start New Thread based on A()
Start New Thread based on B()
shareme = "Updated in main";
}
A()
{
shareme = "Updated in A";
}
B()
{
shareme = "Updated in B";
}
Thanks
Reply
Answers (
2
)
How to remove selected row in Data grid view C#
INSERT INTO Syntax Error