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
Rowie
NA
5
0
Global variables
May 1 2010 10:59 AM
I got a question about variables in C#.
I am trying to save a variable in a different class. I use Add --> New Item --> Class (So it is a complete new class where I want to save my variables I need to use throughout my project). I use getters and setters to save them.
I call the class in Form1 by using:
private
GlobalVars
globalVars =
new
GlobalVars
();
Now when I press a button a new Form appears where I use the same statement else I can't access the class. But when
I try to access a variable by using e.g: globalVars.intClient.toString(); I always get 0. The variables have been reset.
How can I solve this problem ??
Reply
Answers (
4
)
Looping.
Which control use for image slide show?