0

Might seem like a dumb question, but...

Say I have an ASP solution with a Globals.vb file. Inside that file, I have this:

Public Shared MyVariable As String

Now say I publish this solution and make it available to Bob and Cindy.

If Cindy sets (through the interface) MyVariable to 5, would Bob be able to read it?

I hope not, I'm hoping this variable would be user-specific.

Thanks in advance for letting me know.

Best Regards,

Jason

  • I asked the same question awhile back, see the accepted answer: https://stackoverflow.com/questions/4026785/how-do-static-properties-work-in-an-asp-net-enviroment – asawyer Jun 21 '11 at 20:27

1 Answers1

2

Yes, bob would be able to read that it was 5 because it's Shared

more information here: What is the use of a shared variable in VB.NET?

Community
  • 1
  • 1
John Boker
  • 82,559
  • 17
  • 97
  • 130