static vs session

R

rodchar

hey all,

if i wanted to instantiate my business class just once is there a difference
between making a static variable out of it and putting it in say application
session?

thanks,
rodchar
 
J

Jeff Johnson

if i wanted to instantiate my business class just once is there a
difference
between making a static variable out of it and putting it in say
application
session?

I recommend you ask in an ASP.NET group.
 
G

Gregory A. Beamer

hey all,

if i wanted to instantiate my business class just once is there a
difference between making a static variable out of it and putting it
in say application session?

Application or session? Assume you mean hte application object.

There is not much functional difference here, as the static object will be
loaded once in memory. The only place I can see a potential difference, and
conflict, is multiple web apps under a single process with the same object,
but different values, as a static object would not necessarily be scoped
the same way.

Agree with asking in ASP.NET group, however.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top