diff between Application object and static variable in asp .net

G

Guest

diff between Application object and static variable in asp .net. I can
access both the objects in my web page.
I will be grateful if some one can help me understand the difference.

Regards
Ganesan
 
K

Karl Seguin

Application is thread-safe. The minute speed increase you get from using
static variables doesn't mean much when you have to lock all access to them.

If your data is readonly, you can use static variables (since you don't care
if 2 users read at the same time)...or a constant if you know the data at
design time...but I tend to prefer configuration values even for this...

Karl
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top