Software Development Network>> Visual C#>> global variable for windows application
hello,
how can i write and read a global variable for the entire application in C#
Many Thanks,Jassim Rahma
global variable for windows application
stoneyowl
There is no concept of Global Variables in C#, you can use global variables inside the entire class but not in the entire namespace.
Solution for this problem is to create STATIC VARIABLES and use these variables anywhere in the namespace. Hope this might help
e-an
public static class Globals
{
public static string MyString;
public static int MyInt;
public static double MyDouble;
}