C# dictionary keeps changing the values into the last added value. : <p>When I try to add a new name and number from textboxes into a dictionary, and then try to add the content of the dictionary to a listBox all the previous entries are the same. Like if I add "Bob Johnson 42", "Jim Smith 33", "Peter White 21". When I put it in the ListBox it will apear as:
Peter White 21 
Peter White 21 
Peter White 21 </p>

<p>What am I doing wrong? 
Here is the code. </p>

<pre><code>private void button1_Click(object sender, EventArgs e)
    {
           String name = this.textBox1.Text;
           int testNumber = int.Parse(textBox2.Text);
           submittedTests.Add(this.textBox1.Text, testNumber);

        foreach (var x in submittedTests)
        {
            listBox1.Items.Add(name + " " + testNumber);
        }

   }
</code></pre>
