title: using 2 datepickers to display days difference in a textbox
body: <p>I have 2 datetime pickers and i want to display number of days between them on a text box if a user selects a date.. the problem with my code is that its not giving me correct answers and the time span doesnt seem to work.. i dont know where im going wrong thats why i asked for assistance.
  I hope that explained better, please bear with me, its my first time to be on this site so im not familiar with the controls, sending stuff and updating
  When i choose different dates it gives me answer 10.999998008713 days instead of 11 days and i dont know if i need to do math roundup</p>
  
  <pre><code> private void btnCalc_Click(object sender, EventArgs e)
      {        
  
  
            DateTime start = ArrivalDate.Value;
            DateTime finish = DepartureDate.Value;
  
            TimeSpan numberOfNights = finish-start;
  
            double TotalDays= numberOfNights.Days;
            txtBoxNum.Text = (numberOfNights.ToString());
     }
  
     private void ArrivalDate_ValueChanged(object sender, EventArgs e)
     {
         DepartureDate.Value = ArrivalDate.Value.AddDays(1);
     }
  
     private void DepartureDate_ValueChanged(object sender, EventArgs e)
     {
         // setting messagebox to a sensible default message if no date or wrong date picked
  
         if (DepartureDate.Value &lt; ArrivalDate.Value)
         {
             MessageBox.Show("Cannot be less than previous date");
             DepartureDate.Value = ArrivalDate.Value.AddDays(1);
  
         }
  
         else
         {
             double Days = (DepartureDate.Value - ArrivalDate.Value).TotalDays;
             txtBoxNum.Text = Days.ToString();
             return;
  </code></pre>