title: Pass combobox selection to other combo box in another win form c#
body: <p>I have 2 windows forms, they both have same comboboxes with same possible selections. I want to pass selection from one combobox to another on button click.
  I am passing values successfully to textboxes but when it comes to combobox, I cant figure it out.</p>
  
  <p>Here is the code example:</p>
  
  <p>Form 2 definition</p>
  
  <pre><code>private double passTxt;
  
  private string passCB;
  
  public double passTxtValue
          {
              get { return passTxt; }
              set { passTxt = value; }
          }
  public string passCbValue
          {
              get { return passCB; }
              set { passCB = value; }
          }
  </code></pre>
  
  <p>Form 1 send</p>
  
  <pre><code> private void btnPassValues_Click(object sender, EventArgs e)
          {
              Form2 form2 = new Form2(); 
  
              form2.passTxtValue = variable1Form1;
  
              form2.passCbValue = CBForm1.SelectedText;
              form2.Show();
          }
  </code></pre>
  
  <p>Form2 - load (open)</p>
  
  <pre><code>private void form2_Load(object sender, EventArgs e)
          {
              variable1Form2.Text = passTxt.ToString(); 
              CBForm2.SelectedText = passCB;
          }
  </code></pre>
  
  <p>When I check with debugger, the error is in step 2. Form1 send empty string ("") for <code>form2.passCbValue = CBValueForm1.SelectedText;</code></p>
  
  <p>When I try to use index or value it require cast but then there is an error that it can't be casted. Can someone tell me what i do wrong?</p>