title: How to pass data between forms?
body: <p>I am developing a desktop application in which I want to get information from user. If user selects particular radio button then I am opening a new form in popup in which I have placed checked list box. After selecting values from check box I want to access selected value in the previous form. Below are images that can clear idea.</p>
  
  <p><img src="https://i.stack.imgur.com/IejRB.png" alt="enter image description here"></p>
  
  <p>When user click on radio button in "Enable conent type" (as highlighted in the screen) a new form in popup is open to select values from checked list box. After selecting desired value , press "Select" button from Select Content Type form.</p>
  
  <p>Now the form will be hidden but I want to get the selected values in the form "Create Lists".</p>
  
  <h2>My code for Radio Button event is:</h2>
  
  <pre><code>private void rdbEnableCtypeYes_CheckedChanged(object sender, EventArgs e)
  {
      if (rdbEnableCtypeYes.Checked)
      {
          lblSelectContentType.Visible = true;
          frmSelectContentType selectContentType = new frmSelectContentType();
          selectContentType.rootWebUrl = rootWebUrl;
          selectContentType.MdiParent = this.MdiParent;
          selectContentType.StartPosition = FormStartPosition.CenterScreen;
          selectContentType.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
          selectContentType.Show();
      }
      else
      {
          lblSelectContentType.Visible = false;
          cmbContentType.Visible = false;
      }
  } 
  </code></pre>
  
  <h2>My code for form of Select content type is:</h2>
  
  <pre><code>public string rootWebUrl = string.Empty;
  XDocument contentTypeFile = XDocument.Load(FilePaths.ContentTypesFilePath);
  private void frmSelectContentType_Load(object sender, EventArgs e)
  {
      if (!string.IsNullOrEmpty(rootWebUrl))
      {
          if (contentTypeFile != null)
          {
              XElement xSiteCollection = contentTypeFile.Descendants(XmlElements.SiteCollection).Where(x =&gt; x.Attribute(XmlAttributes.Url).Value.Equals(rootWebUrl)).FirstOrDefault();
              if (xSiteCollection != null)
              {
                  IEnumerable&lt;XElement&gt; xContentTypes = xSiteCollection.Descendants(XmlElements.ContentType);
                  if (xContentTypes.OfType&lt;XElement&gt;().Count() &gt; 0)
                  {
                      foreach (XElement xContentType in xContentTypes)
                      {
                          ComboboxItem item = new ComboboxItem();
                          item.Text = xContentType.Attribute(XmlAttributes.Name).Value;
                          item.Value = xContentType.Attribute(XmlAttributes.Id).Value;
                          lstContenType.Items.Add(item);                                
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>What should I do?</p>