title: Adding Int to DateTime in format DD/MM/YYYY
body: <p>I have got maskedTextBox1 in which I got date in format and mask <code>DD/MM/YYYY</code> and in textBox2 I got int value.</p>
  
  <p>Now I need to add int number to maskedTextBox1 value and display it in next maskedtextbox2. The int value should be added to days e.g.: <code>20/09/2013</code> + 8 = <code>28/09/2013</code> </p>
  
  <p>May I ask how it can be done?</p>
  
  <p>I tried this:</p>
  
  <pre><code>string date1 = maskedTextBox2.Text;
  string nodays = zpocdnu.Text;
  
  maskedTextBox1.Text = date1 + nodays;
  </code></pre>
  
  <p>But as I'm not that long in c# I'm not sure what conversion shouldI choose. </p>
  
  <p>Thanks for helping in advance.</p>
  
  <p>Edit - this is the answer - thanks to Rajesh Subramanian:</p>
  
  <pre><code>        private void zpocdnu_TextChanged(object sender, EventArgs e)
      {
          DateTime rs;
  
          CultureInfo ci = new CultureInfo("en-IE");
  
          if (DateTime.TryParseExact(this.maskedTextBox2.Text, "dd/MM/yyyy", ci, DateTimeStyles.None, out rs) &amp;&amp; zpocdnu.TextLength &gt; 0)
          {
  
  
              DateTime today = DateTime.Parse(maskedTextBox2.Text);
              DateTime answer = today.AddDays(Convert.ToInt32(zpocdnu.Text) - 1);
  
  
              maskedTextBox1.Text = answer.ToString();
  
          }
  
  
      }
  </code></pre>