title: Remove Minutes from a Timespan duration
body: <p>I know this has been asked before but i couldn't figure out how to get the answers given working for my particular example. This is a WPF application written in C# and i'm trying to remove a number of minutes from a timespan.</p>
  
  <p>So far i've got the application to figure out the duration by removing a Start Time from a Finish Time, but what i'm trying to do now is remove the number of minutes the user has entered into the form.</p>
  
  <p>Here's the code so far</p>
  
  <pre><code> private void testcal_Click(object sender, EventArgs e)
      {
  
          string startTime = teststart.Text;
          string finishTime = testfinish.Text;
  
          // Trying to deduct this lunchTime var from the duration TimeSpan
          string lunchTime = testlunch.Text;
  
          TimeSpan duration = DateTime.Parse(finishTime).Subtract(DateTime.Parse(startTime));
          testlabel.Text = duration.ToString(@"hh\:mm");
  
      }
  </code></pre>
  
  <p><strong>Edit - Updated to include private void</strong></p>