KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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; } In this example I need to call string " a " defined in function button1_Click() from function button2_Click()
Tags (comma-separated)
Save Edits
Cancel