title: how to change timespan variable to a integer type?
body: <p>I'm trying to convert timespan variable into an integer variable using 'parse'. I get an error that says:</p>
  
  <blockquote>
    <p>Format exception was unhandled: Input string was not in correct format</p>
  </blockquote>
  
  <p>This is the code is have :</p>
  
  <pre><code>   private void dateTimePicker4_ValueChanged(object sender, EventArgs e)
      {
          TimeSpan t = dateTimePicker4.Value.ToLocalTime() - dateTimePicker3.Value.ToLocalTime();
          int x = int.Parse(t.ToString());
          y = x;
      }
  </code></pre>
  
  <p>My target is to display this the change in time for two timepickers, dynamically in a text box, i.e, the difference in minutes between them should be displayed in a textbox automatically. </p>