Static methods on ASP.NET web sites

寵の児 提交于 2019-12-24 19:29:24

问题


i was wondering.. if i have a static method on an asp.net web site (plain vanilla), is that accessible by all users of all sessions?

I guess what i am saying is the single instance of a method available to each client? or is there 1 instance for all clients for the site..


回答1:


The static value is the same for all users on the same pool.

Different pools have different static values.

The session have nothing to do with the static values, and the users that are on the same pool have the same static values.



来源:https://stackoverflow.com/questions/2779617/static-methods-on-asp-net-web-sites

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!