Branco,
> In the above example, the State property will be available to the
> entire application.
Nice, what can I add, Maybe:
To make your program good maintable you can use this as:
Globals.State
:-)
Cor
"Branco Medeiros" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> MeAgin wrote:
>> I want to maintain few variables available for all the classes within the
>> system. For example the session key and the logged in user'd ID. How can
>> I
>> do this? I can have a class with all these as properties. But how can I
>> make
>> a instance of that classes available everywhere?
> <snip>
>
> Put an instance of your class in a Module:
>
> <aircode>
> Module Globals
> Private mState As New AppState
>
> Public ReadOnly Property State As AppState
> Get
> Return mState
> End Get
> End Property
> ...
> End Module
> </aircode>
>
> In the above example, the State property will be available to the
> entire application.
>
> HTH.
>
> Regards,
>
> Branco.
>
|