S
Sahil Malik [MVP]
So here's a rather simple question.
Say in an ASP.NET application, I wish to share common constants as static
variables in global.asax (I know there's web.config bla bla .. but lets just
say I wanna use global.asax) ---
Would you declare your static var as ---
public static int x ;
or would you wrap it up in an accessor property as ---
private static int x ;
public static int X
{
get { return x ; }
}
.... and why?
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------
Say in an ASP.NET application, I wish to share common constants as static
variables in global.asax (I know there's web.config bla bla .. but lets just
say I wanna use global.asax) ---
Would you declare your static var as ---
public static int x ;
or would you wrap it up in an accessor property as ---
private static int x ;
public static int X
{
get { return x ; }
}
.... and why?
- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------