Re: The use of modules (or not)
- From: "Robin Tucker" <idontwanttobespammedanymore@xxxxxxxxxxxxxxx>
- Date: Tue, 21 Jun 2005 13:08:51 +0100
If you really want to use globals, google for the singleton pattern. There
is absolutely nothing wrong with "global" variables in this context, as long
as they are managed properly and you protect the implementation sufficiently
from changes. They are essential in many circumstances (I use them for my
"cache manager" in the software I am currently using) - and yes, you can
define your singleton class in a module for global access.
"Morten Snedker" <morten_spammenot_ATdbconsult.dk> wrote in message
news:1epfb1p43l68b73h5saohti3c2208pqhc4@xxxxxxxxxx
> I've read that modules in .Net are mainly for backwards compability.
> Is this true?
>
> If I have variables I want to be exposed to all classes (regular
> classes, forms etc), I'd find it natural to put these in a module and
> dimension them Public.
>
> Or is the proper way to do it differently?
>
>
> Regards /Snedker
.
- Follow-Ups:
- Re: The use of modules (or not)
- From: Chad Z. Hower aka Kudzu
- Re: The use of modules (or not)
- References:
- The use of modules (or not)
- From: Morten Snedker
- The use of modules (or not)
- Prev by Date: Re: Listbox problems
- Next by Date: Re: Writing dataset to CSV file?
- Previous by thread: Re: The use of modules (or not)
- Next by thread: Re: The use of modules (or not)
- Index(es):
Relevant Pages
|
Loading