10 TIPs - To Become a Good Developer/Programmer
Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Administrator
Admin
2.2k
1.4m
Storing variables throughout a "session"
Mar 25 2003 7:27 PM
I'm in startup phase of creating a Yatzee game in .NET, using Windows Forms and C#. I apologize for moron-like questions here, but I'm a web programmer.... From what I understand, there is no such thing as a global variables (as in Visual Basic 6.....bas files) in .NET. Am I right? Ok, if this is the case, how would I have to approach the situation in my game where I have to store players scores throughout a game? I suppose I can use the labels in my form, but this just seems like a pain in the butt, because then I have to go through all labels whenever I need to calculate total scores etc. It would be nice to have an array of objects (Player objects) where I store a player's data (name, score, how many choices left, and so on). Can anyone give me a pointer? Thanks so much!
Reply
Answers (
1
)
Pulling Files from Web site
Selecting a Row in a DataGrid