I ran into this while watching a tutorial. Haven't seen it before, and I'd like to know what's going on here.
Application["ApplicationStartDateTime"] = DateTime.Now;
Here it is in context:
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
Application["ApplicationStartDateTime"] = DateTime.Now;
}
protected void Application_End()
{
Application.Clear();
}
}
The application_Start method is boiler plate except for the StartDateTime line that was added with little explanation as to why. Specifically, I want to know about the square brackets. I'm aware of arrays, and I'm aware of annotations, but this looks different.