HttpApplicationState question..

R

Rajesh.V

I saw this code

protected void Application_Start(Object sender, EventArgs e)
{

// Initialize the Environment

new SomeObject.

}



Does this mean to be the same as

Application.Add("Environment", someobject);
 
P

Paul Glavich

No, the "new SomeObject" in the Application_Start event, will only exist
within the scope of that event. The Application.Add(...) statement adds a
new application variable named "Environment" with a value of "someObject"
that *does* exist for the lifetime of the application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top