DLL中的公共共享属性 [英] Public Shared Property in a DLL
问题描述
假设有一个ASP dot.net Web应用程序和一个dot.net类库
(用vb dot.net编写)。 Web应用程序引用类库。
类库包含...
公共类测试
公共共享属性()作为字符串
...
结束财产
结束班级
当然, Web应用程序被许多用户并行使用。现在,对于每个用户,上述属性是否会存在一次,或者对于
所有用户是否只存在一次?
Michael G. Schneider
所有用户都会看到相同的属性值。
" Michael G施奈德 < mg*@newsgroups.nospamwrote in message
news:e4 ************** @ TK2MSFTNGP03.phx.gbl ...
假设有一个ASP dot.net Web应用程序和一个dot.net类库
(用vb dot.net编写)。 Web应用程序引用了类
库。类库包含...
公共类测试
公共共享属性()为字符串
...
结束属性
结束类
当然,许多用户并行使用Web应用程序。现在,对于每个用户,上述属性是否会存在一次,或者对于所有用户是否只存在一次
?
Michael G. Schneider
" Aidy" < ai ** @ xxnoemailxx.comschrieb im Newsbeitrag
新闻:_8 **************************** ** @ bt.com ...
所有用户都会看到相同的属性值。
非常感谢非常快速的回复。
是否有可能拥有全局变量?在DLL中,存在
每用户?
Michael G. Schneider
如果你想要每个用户的东西然后使用Session对象。
" Michael G. Schneider" < mg*@newsgroups.nospamwrote in message
news:ew ************** @ TK2MSFTNGP02.phx.gbl ...
" Aidy" < ai ** @ xxnoemailxx.comschrieb im Newsbeitrag
新闻:_8 **************************** ** @ bt.com ...
>所有用户都会看到相同的属性值。
非常感谢非常快速的响应。
是否可以拥有一个全局变量?在DLL中,存在
每用户?
Michael G. Schneider
Suppose there is a ASP dot.net web application and a dot.net class library
(written with vb dot.net). The web application references the class library.
The class library contains a ...
Public Class test
Public Shared Property() As String
...
End Property
End Class
Of course, the web application is used by many user in parallel. Now, will
the above property exists once for each user, or will it exist only once for
all users?
Michael G. Schneider
All users will see the same property value.
"Michael G. Schneider" <mg*@newsgroups.nospamwrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...Suppose there is a ASP dot.net web application and a dot.net class library
(written with vb dot.net). The web application references the class
library. The class library contains a ...
Public Class test
Public Shared Property() As String
...
End Property
End Class
Of course, the web application is used by many user in parallel. Now, will
the above property exists once for each user, or will it exist only once
for all users?
Michael G. Schneider
"Aidy" <ai**@xxnoemailxx.comschrieb im Newsbeitrag
news:_8******************************@bt.com...All users will see the same property value.Thanks a lot for the very fast response.
Is it possible to have a "global variable" in the DLL, which exists
per-user?
Michael G. Schneider
If you want something per-user then use the Session object.
"Michael G. Schneider" <mg*@newsgroups.nospamwrote in message
news:ew**************@TK2MSFTNGP02.phx.gbl..."Aidy" <ai**@xxnoemailxx.comschrieb im Newsbeitrag
news:_8******************************@bt.com...>All users will see the same property value.
Thanks a lot for the very fast response.
Is it possible to have a "global variable" in the DLL, which exists
per-user?
Michael G. Schneider
这篇关于DLL中的公共共享属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!