i would like the variable xyz to be avaialble at all levels, but this does not appear to be happening, even though it is defined in a public section…what is wrong here? I get the error: the name xyz does not exist not in this context …is there a fix?
public class Program
{
// This will hold the main window.
static Window window;
public static void Main()
{
GlideTouch.Initialize();
string xyz = "";
InitWin();
}
static void btn_Releaseit(object sender)
{
xyz = "testing"; //error the name xyz does not exist not in this context
}
static void btn_PressIt(object sender)
{
xyz = "here it is"; //error the name xyz does not exist not in this context
}
static void InitWin()
{
///code
}
}
}