untwisted Posted July 20, 2003 Posted July 20, 2003 Hi, I've run into another problem. How can I get around the no global variable rule in C#. I need to make a counter type variable, and it needs scope throughout my program. Thanks! Quote
*Experts* Volte Posted July 20, 2003 *Experts* Posted July 20, 2003 Put it in a class, public and shared (static in C#). public class Globals { public static Int32 myGlobal = 4; }Then access it like this:Globals.myGlobal = 4; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.