PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Store Global variables in a hashtable

Reply

Store Global variables in a hashtable

 
Thread Tools Rate Thread
Old 29-03-2004, 01:19 PM   #1
Jack Wright
Guest
 
Posts: n/a
Default Store Global variables in a hashtable


Dear All,
I am designing a WinForm Application and would like to keep track of
all the Global variables declared in my application. The logic for
this that I have in mind is to create a class that has a hashtable and
all application programs store their variables in a hashtable by
calling my class functions...Is this a good design for storing global
variables in a WinForm application? Or are there better ideas?

Please help

Many Regards
Sunil
  Reply With Quote
Old 29-03-2004, 01:52 PM   #2
Herfried K. Wagner [MVP]
Guest
 
Posts: n/a
Default Re: Store Global variables in a hashtable

* sunil@volcanomail.com (Jack Wright) scripsit:
> I am designing a WinForm Application and would like to keep track of
> all the Global variables declared in my application. The logic for
> this that I have in mind is to create a class that has a hashtable and
> all application programs store their variables in a hashtable by
> calling my class functions...Is this a good design for storing global
> variables in a WinForm application? Or are there better ideas?


Something like this?

<URL:http://www.palmbytes.de/content/dotnet/optionslib.htm>

Notice that the text is written in German, but the downloads are written
in C#.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
  Reply With Quote
Old 29-03-2004, 01:53 PM   #3
Saurabh
Guest
 
Posts: n/a
Default Re: Store Global variables in a hashtable

You shouldn't need lot of global variables at all in your application. If
you are talking of some application wide settings / preferences, then I
think your approach is a good way of dealing with it.

--Saurabh

"Jack Wright" <sunil@volcanomail.com> wrote in message
news:8f556eeb.0403290419.2a8cd144@posting.google.com...
> Dear All,
> I am designing a WinForm Application and would like to keep track of
> all the Global variables declared in my application. The logic for
> this that I have in mind is to create a class that has a hashtable and
> all application programs store their variables in a hashtable by
> calling my class functions...Is this a good design for storing global
> variables in a WinForm application? Or are there better ideas?
>
> Please help
>
> Many Regards
> Sunil



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off