Use a value in a Form from another
<p>I have two forms: </p>

<p>form1 and form2 </p>

<p>In the Form1 I have all the values, in the Form2 I have a graph.</p>

<p><strong>How can I use the value of form1 inside Form2 without getting this error?</strong></p>

<p>I tried to use this code but it didn't work: </p>

<p>In Form2:</p>

<pre><code>public partial class Form2 : Form1
    {
        public Form2()
        {
            InitializeComponent();

        }
    }
</code></pre>

<p>In Form1 :</p>

<pre><code>private void graphe_Click(object sender, EventArgs e)
        {
            Form f = new Form2();
            f.ShowDialog();
            Form f2 = new Form1();
            f2.Hide();
        }
</code></pre>

<p><img src="http://i.stack.imgur.com/MTMtR.png" alt="enter image description here"></p>
