title: C# DateTime TimeSpan duration?
body: <p>I have a log of in and out times.  I want to have a column in the log be the total time during one login and next to that the total login times for that person for the entire log.</p>
  
  <p>I've been getting the first duration using the TimeSpan object, but to continually add up the total time while I churn through the result set has eluded me:</p>
  
  <pre><code>// Set duration of this visit
  timeInRoom = -(ieLog.Ingresstime - ieLog.Egresstime);
  </code></pre>
  
  <p>I've tried having another TimeSpan variable to hold the value of the last iteration and add timeInRoom to that so I could have a running tally, but that doesn't appear to be working.  </p>
  
  <p>I'm guessing that I'm going about this the wrong way.  Any ideas?  The times are DateTime values in the result set. </p>
  
  <p>Thanks.</p>