Hello, Jassim!
JR> how can i write and read a global variable for the entire application
JR> in C#?
Since you cannot define variable on the namespace level, then the solution can be creation of a class with public static variables.
internal class GlobalVars
{
public static int GlobalVar1;
public static string GlobalVar2;
}
However, you should be carefull with this vars if you're working in the multithreaded environment.
A solution here can be substitution of vars with properties, where the neede sync will happen.
--
Regards, Vadym Stetsyak
www:
http://vadmyst.blogspot.com