Session Variables and Static Variables
I have found it very easy to have a Helper class that has static
members which access Session Variables. For example:
public class HelperClass
public static doCustomer CurrentCustomer
if(HttpContext.Current.Session["Current_Customer"] == null)
CurrentCustomer = new doCustomer();
HttpContext.Current.Session["Current_Customer"] = value;
Is this thread safe? Will each user of the Application still have his
own instance of doCustomer, even though it is accessed via an
Application Wide static member? What is the best practice regarding
Thread Safety, Session Management and Static Members?
Re: Session Variables and Static Variables
|All times are GMT. The time now is 01:17 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.