Hi,
Creating an app for a C# windows mobile device for my golfing.
I normally use VB.NET and it seems easier working with global vars, etc. but I prefer to switch to C#.
Anyway, I need to "group" about 10-15 vars (mixture of double, int and string) for the hole I am playing.
Shoud I use a struct and group these vars? I need to access them globally and at the moment the few vars I have created are working globally, but before going to far, I would like to get this right.
I have a generalvars class, where I am placing routines that need to be accessed via different forms, and I am using a few datasets to store information that gets written to an XML file.
Can anyone offer some pointers if I am on the right track or is there another "container type" to use (other than a class).
Thanks,
Rob
Creating an app for a C# windows mobile device for my golfing.
I normally use VB.NET and it seems easier working with global vars, etc. but I prefer to switch to C#.
Anyway, I need to "group" about 10-15 vars (mixture of double, int and string) for the hole I am playing.
Shoud I use a struct and group these vars? I need to access them globally and at the moment the few vars I have created are working globally, but before going to far, I would like to get this right.
I have a generalvars class, where I am placing routines that need to be accessed via different forms, and I am using a few datasets to store information that gets written to an XML file.
Can anyone offer some pointers if I am on the right track or is there another "container type" to use (other than a class).
Thanks,
Rob
Comment