title: How Can I Set Dictionary Value On Other Form?
body: <p>I am a C# beginner, I've encountered a problem as below, but I'm not sure what is causing it or how to fix it. Experience coders, please help.</p>
  
  <p>I have a <code>Dictionary</code> in Form1, but I want to set its value from Form2. However, after assigning the value, the <code>MessageBox</code> result still shows 0;</p>
  
  <p>Form1: msgbox show result = 0</p>
  
  <pre><code>    public Form1()
      {
          InitializeComponent();
          bidcoords["TEST"] = 0;
      }
  
      public Dictionary&lt;string, int&gt; bidcoords = new Dictionary&lt;string, int&gt;();
  
      private void button2_Click(object sender, EventArgs e)
      {
          MessageBox.Show(bidcoords["TEST"].Value.ToString());
      }
  </code></pre>
  
  <p>Form2:</p>
  
  <pre><code>    Form1 form1 = new Form1();
  
      private void button2_Click(object sender, EventArgs e)
      {
         form1.bidcoords["TEST"] = 30; 
      }
  </code></pre>