Hi All Just want to know if the content in this article is correct,
http://www.c-sharpcorner.com/UploadFile/suthish_nair/3020/
I have given my comments to that article,If anyone can help pls.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bryian TanPosted Sep 16, 2010, 10:29 PM
Hello,
Yes, you are correct, static objects are accessible across threads and shared among all instances of a class. In a multiuser environment, the same static variables are being used across all sessions. In the article the static variables are not thread safe, if the DataSet value is not user specific then there will be no problem. Otherwise there will be a concurrency risk when multiple users are using the application at the same time. The value set by the first user will be overwritten by the second user and so forth.
Thanks,
Bryian Tan