Hi
Since global variables arent availible in C#, what can I use to access variables inside other classes etc.
Fx, I want to access the variable testStr created in button 1 from button 2:
Code:private void button1_Click(object sender, EventArgs e) { String testStr = "Hello World"; } private void button2_Click(object sender, EventArgs e) { MessageBox.Show(testStr); }




Reply With Quote