How to send variables from one button to another
<p>I have this so far on one of my programs and I would like it to be where if you press on one button to break up the number you enter, you enable another button to get that data and save it to an outfile.</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
{
    string number = textBox1.Text;
    int digits = int.Parse(number);
    if (digits &gt; 9999 || digits &lt; 0)
    {
        MessageBox.Show("That is not a valid number");
    }
    else
    {
        int thousands = digits / 1000;
        int hundreds = (digits - (thousands * 1000)) / 100;
        int tens = (digits - ((hundreds * 100) + (thousands * 1000))) / 10;
        int ones = (digits - ((tens * 10) + (hundreds * 100) + (thousands * 1000))) / 1;
        label6.Text = thousands.ToString();
        label7.Text = hundreds.ToString();
        label8.Text = tens.ToString();
        label9.Text = ones.ToString();
        button2.Enabled = true;
    }
</code></pre>

<p>I have this so far and it works but for button2, I want these variables that are generated from clicking button one to pass to button2 so when you click on it, it will use those variables to write to a file. Any ideas?</p>
