c# - Are private static variable inside non-static class available to the entire application? -


i have this:

... public partial class mypage : system.web.ui.page {      private static string _code = null; ... 

will _code variable shared on application loads mypage?

this question not duplicate

the possible duplicate not address static variables inside non-static class. know not matter, however, "duplicate" not this.

yes, shared across application domain. since single app domain created each iis application within iis worker thread, value of static variable can considered shared globally.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -