I'm converting a VB.NET project to C#. The VB.NET project has a module with a number of global variables that are used in different classes. For example, g_UserID is used in 3 different classes.
I am using an online converter to create the C# code. Of course, the global variables do not translate.
I moved all the global variables into a static class, and made the variables public static members.
Is there a way to avoid adding the static class name in front of the static members when used in other classes? I would like to avoid modifying the converted code (I am using an online converter). In other words, I would like to keep using "g_UserID" instead of "StaticClass.g_UserID"?
Joe Schwarz
Custom Software Developer
I am using an online converter to create the C# code. Of course, the global variables do not translate.
I moved all the global variables into a static class, and made the variables public static members.
Is there a way to avoid adding the static class name in front of the static members when used in other classes? I would like to avoid modifying the converted code (I am using an online converter). In other words, I would like to keep using "g_UserID" instead of "StaticClass.g_UserID"?
Joe Schwarz
Custom Software Developer