Shared variables, properties and events
Hi, I am just reading up about using shared variables, properties and events when creating classes in .NET.
The book shows me how do to this but I would like to be given some real life examples of when and why I would make a variable shared..
The basic example they give is a shared variable counter that displays how many objects you have created from a given class.
That's all very nice but a pretty lame example I think. What else would I use a shared variable for when defining a class??
Thanks
Mark