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
graphicsware
NA
2
0
Reference to class not working?
Apr 29 2004 1:24 PM
Hello, I am running in a problem, I have a class called Test, and I create 10 instances of it. The class contains an integer. public class Test { public Test(int init) { g = init; } public int g; } Now, I set the current "test" instance: Test current = "one of the 10 instances here"; Now.. if I modify the contents of the current instance after setting it as current, the current Test won't reflect these changes. For example: Test current = inst1; inst1.g = 100; now, current.g doesnt contain 100, but the old value.. I am confused. Doesn't reference work that way? Also, how do I use WeakReference, and where is it suitable at? Sorry for so many questions.
Reply
Answers (
1
)
change a picturebox image
Can this be done?