title: How to pass data from parent form to the child form in c# winform
body: <p>I am trying to pass some strings(device info) from the parent form(the main form )in MDI to the child form</p>
  <ul>
  <li>The child form displays</li>
  </ul>
  <ol>
  <li>Device name</li>
  <li>Device model number</li>
  <li>Manufactured date,</li>
  </ol>
  <ul>
  <li>All these features should be passed to the child form when the ON button in the parent form is being clicked.</li>
  <li>The child form is called through the menu.</li>
  <li>Till now I have had success in only calling the child through the menu but cannot pass the data.</li>
  </ul>
  <p>Parent Form:
  menu to view the child form on the MDI(parent form) whenever I want to</p>
  <pre><code>private void DeviceInfomationToolStripMenuItem_Click(object sender, EventArgs e)
          {
              if (Application.OpenForms[&quot;Child&quot;] is Child deviceInfo)
              {
                  deviceInfo.Focus();
                  return;
              }
              deviceInfo = new Child();
              deviceInfo.MdiParent = this;
              deviceInfo.Show();
          }
  </code></pre>
  <p>Parent From: On button event</p>
  <pre><code>private void btnOn_Click(object sender, EventArgs e)
          {
              deviceName = &quot;Notebook520220624&quot;;
              deviceModel =  &quot;520220627&quot;;
              manuFacturedDate = &quot;220627&quot;;
              Child form = new Child(deviceName);
          }
  </code></pre>
  <p>Child Form: Receiving the device info and displaying it</p>
  <pre><code>public Child(string deviceName)
  {
    InitializeComponent();
    name_lbl.Text = deviceName
    //name_lbl.Text = deviceName.ToString();
    //model_lbl.Text = diviceModel;
    //date_lbl.Text = manuFacturedDate;
  }
  </code></pre>