T
tony collier
if i put an array in
public class Global : System.Web.HttpApplication
{
//e.g.
public static int [] count=new int[5]
}
and then refer to it in my page .cs files as Global.count[0].... [4] will
every session in my application be accessing the same count array or will
they each have their own?
I guess i am really saying is, is there a difference between the above and
:
protected void Session_Start(Object sender, EventArgs e)
{
Sesson["count"]=new int[5]
}
It strikes me that if they are the same then the first option is better
because i don't have to keep casting from object to int everytime i access
the array in web pages.
public class Global : System.Web.HttpApplication
{
//e.g.
public static int [] count=new int[5]
}
and then refer to it in my page .cs files as Global.count[0].... [4] will
every session in my application be accessing the same count array or will
they each have their own?
I guess i am really saying is, is there a difference between the above and
:
protected void Session_Start(Object sender, EventArgs e)
{
Sesson["count"]=new int[5]
}
It strikes me that if they are the same then the first option is better
because i don't have to keep casting from object to int everytime i access
the array in web pages.