R
rwoo_98
Does anyone know the difference between defining a static variable
inside Global vs using an Application variable?
For example
Using a static int variable.
public class Global : System.Web.HttpApplication
{
public static int MaxValue
protected void Application_Start(Object sender, EventArgs e)
{
MaxValue = 100;
}
}
referring to this in your other classes using Global.MaxValue
vs
public class Global : System.Web.HttpApplication
{
public static int MaxValue
protected void Application_Start(Object sender, EventArgs e)
{
Application["MaxValue"] = 100;
}
}
referring to this in your other classes using
(int)Application["MaxValue"]
Thanks in advance
inside Global vs using an Application variable?
For example
Using a static int variable.
public class Global : System.Web.HttpApplication
{
public static int MaxValue
protected void Application_Start(Object sender, EventArgs e)
{
MaxValue = 100;
}
}
referring to this in your other classes using Global.MaxValue
vs
public class Global : System.Web.HttpApplication
{
public static int MaxValue
protected void Application_Start(Object sender, EventArgs e)
{
Application["MaxValue"] = 100;
}
}
referring to this in your other classes using
(int)Application["MaxValue"]
Thanks in advance