title: Iterate between two dates in C#
body: <p>I have two dates:</p>
  
  <pre><code>DateTime fromDate = new DateTime(2013,7,27,12,0,0);
  DateTime toDate = new DateTime(2013,7,30,12,0,0);
  </code></pre>
  
  <p>I want to iterate from fromDate to toDate by incrementing fromDate with a single day and the loop should break when fromDate becomes equal to or greater than the toDate. I have tried this:</p>
  
  <pre><code>while(fromDate &lt; toDate)
  {
  fromDate.AddDays(1);
  }
  </code></pre>
  
  <p>But this is an infinite loop and won't stop. How can I do this ?</p>