Where does static variable work in C# page. At Application level or Page Level
Posted
by Shantanu Gupta
on Stack Overflow
See other posts from Stack Overflow
or by Shantanu Gupta
Published on 2010-04-26T16:24:31Z
Indexed on
2010/04/26
16:33 UTC
Read the original article
Hit count: 194
I had an interview today and every thing was going very good, but then an interviewer asked me a question Where Does Static Variable Work in C#- At Application Level or At Page Level.
I was not very much clear about this answer as I only knew that static variables are stored on heap and I didn't knew anything about web related thing about it.
Then tried to make me more clear by giving an example that in a page I am using static variable and three users are accessing the page one of the user updates the value of static variable, What value will be visible to remaining two users an old copy or the update will be reflected.
© Stack Overflow or respective owner