passing an array from one button to another one
<p>How can I pass an array of integer from a button to another one?</p>

<p>Here is more information (the following code is not exactly my original code, but it explains what I'm asking):</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
{
    int[,] array1 = new int[pictureBox1.Height, pictureBox1.Width];
    int[,] array2 = new int[pictureBox1.Height, pictureBox1.Width];

    array2 = binary(array1);//binary is a function
}

private void button2_Click(object sender, EventArgs e)
{
   //I need array2 here
}
</code></pre>

<p>Now I want to access array2 in button2. How can I do that? What is the best solution?</p>

<p>Thanks in advance.</p>
