I moving a game project from Visual Basic to Visual C#. I use global variables and arrays that loads in a Visual Basic module. Visual C# don´t have something like VB modules (at least I can´t find something similar). So to declare my global variables and arrays I made a GlobalClass and declare all of them inside it. Then I work with them using GlobalClass.variablename.
Is working fine but I´m not sure if this is a correct way to declare global variables in Visual C#. Is there something like VB modules in Visual C#? Is there a better way to declare global variables that inside a class?
I'm pretty sure you're doing it right. http://www.dotnetperls.com/global-variable
C# is a pure object oriented language so everything has to go into a class.
The link G_G gave you shows you how to declare a static class and static variables inside. This is basically a better structured way to use a global variable.
Ok thanks for the help