equivalent of a Session variable in Windows Forms?

  • Thread starter Thread starter Tarren
  • Start date Start date
T

Tarren

Hi:

In Visual Basic is there the equivalent of a Session variable where I can
store variables in memory while the executable is running? I have been
coding ASP .NET for some time, but am new to Windows forms.

TIA
- Tarren
 
Well, since the Session varibales in ASP(.NET) are session specific, all you
have to in Windows Forms is to create a variable that's public and
global/shared to your entire application.
 
Hi Tarren,

You do not need a Session in a window forms program.

Both, the aspnet application and the windowforms application, belong to the
client which it is using.

However that is direct the big difference, that is with the webapplication
the aspnet user and with the windowapplication the client himself. (The
session belongs to the webclient).

That implicate that a shared variable or object belongs with a webpage to
all users and with a windowform to the specific client.

Therefore using a shared object/variable in a webpage needs a special
threathment. In a windowform application there is absolute no need for that,
and that implicate as well that there is no need to use the session in the
windowsform application. You can use shared variable/objects.

If this is not clear or how to make shared varibables/objects, ask again?

Cor
 
Back
Top