Ok after reading this article and also some of the examples I am still not clear on what global variables mean. So its say private variables in your class are global?
http://www.c2.com/cgi/wiki?GlobalVariablesAreBad
So can someone explain this to me in simple terms the context. Does this mean even private fields at the top of your class? I'm not clear on the definition of a "global variable" so that I can distinguish if I'm doing something "bad" in my classes.
In C# an example of a global variable would be a public static variable on a public class. The entire program could read/write to it and it would be shared across threads as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With