How would I add a Stack object into my global.asax so it’s accessible by the entire application? At the moment I have:
void Application_Start(object sender, EventArgs e)
{
// Global vars
Application.Add("ArcadeTotalUniquePlayers", 0);
Application.Add("ArcadeTotalPlays", 0);
Stack<int> ArcadeLastPlayers = new Stack<int>(16);
The first two variables work, but I’m not sure how to make the Stack globally accessible.
You could do:
and then
Or you could make some sort of global static, so you don’t have to cast it every time you need to retrieve it:
and then