title: Referencing a variable from another method
body: <p>I'm new to C# and I really need to know how to call/use a string from another method.</p>
  <p>For example:</p>
  <pre><code>public void button1_Click(object sender, EventArgs e)
  { 
      string a = &quot;help&quot;;
  }
  
  public void button2_Click(object sender, EventArgs e)
  {
      //this is where I need to call the string &quot;a&quot; value from button1_click 
      string b = &quot;I need &quot;;
      string c = b + a;          
  }
  </code></pre>
  <p>In this example I need to call string &quot;<strong>a</strong>&quot; defined in function <code>button1_Click()</code> from function <code>button2_Click()</code></p>