I'm new to C# and i really need to know how to call/use a string from another method.
For example:
public void button1_Click(object sender, EventArgs e)
{
string a = "help";
}
public void button2_Click(object sender, EventArgs e)
{
//this is where I need to call the string "a" value from button1_click
string b = "I need ";
string c = b + a;
}
So in this example I need to call string "a" defined in function button1_Click()
from function button2_Click()
Thanks!!
Source: Stackoverflow.com