title: How to add a number of days to a Date while skipping weekends and other holidays
body: <p>Given a Date. How can I add a number of days to it while skipping weekends and other holidays coming between the range?</p>
  
  <pre><code>List &lt;DateTime&gt; holidays = new List&lt;DateTime&gt;()
  {
       new DateTime(2012, 01, 03),
       new DateTime(2012, 01, 26)
  }; 
  
  dateTimeReview.Value = CalculateFutureDate(dateTimeStart.Value, 7,holidays);
  
  static DateTime CalculateFutureDate(DateTime fromDate, int numberofWorkDays, ICollection&lt;DateTime&gt; holidays)
  {
       var futureDate = fromDate;
  
       for (var i = 0; i &lt; numberofWorkDays; i++ )
       {
            if (futureDate.DayOfWeek == DayOfWeek.Saturday 
               || futureDate.DayOfWeek == DayOfWeek.Sunday
               || (holidays != null &amp;&amp; holidays.Contains(futureDate)))
            {
                futureDate = futureDate.AddDays(1); // Increase FutureDate by one because of condition
                futureDate = futureDate.AddDays(1); // Add a working day
            }
       }
       return futureDate;
  }
  </code></pre>