问题描述
.....这就是问题。
任何人,我有一个应用程序,只有少数人会使用。
使用。其中一项功能允许他们将
人员列表检索到数据网格中。我想制作这样做的方法
static。一旦数据被检索,它就会在本地进行数据通信。他们不会更新它。这种情况发生在另一个地方。
这些修复方法是否会导致任何问题?我
不需要实例。但是,该方法是静态的
会导致第二个人看到第一个人检索到的结果吗?我不想要任何跨越数据的b $ b。我知道实例会在每个用户之间建立一个
的墙。我只是不确定用户是否会通过静态方法分享
数据。
谢谢,
Brett
.....that is the question.
Any who, I have an application that only a handful of people will being
using. One of the features allows them to retrieve of a listing of
people into a datagrid. I''d like to make the method that does this
static. Once the data is retreived it is munipulated locally in a
dataview. They won''t be updating it. That occurs in another place.
Would making these retreival methods static cause any problems? I
don''t have a need for instances. However, will the method being static
cause the 2nd person to see results retreived by the 1st person? I
don''t want any crossing over of data. I know instances will build a
wall between each user. I''m just not sure if users will end up sharing
data via the static method.
Thanks,
Brett
这篇关于要使用静态还是不要使用静态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!