title: Calculate the number of weekdays between two dates in C#
body: <p>How can I get the number of weekdays between two given dates without just iterating through the dates between and counting the weekdays?</p>
  
  <p>Seems fairly straightforward but I can't seem to find a conclusive correct answer that abides by the following:</p>
  
  <ol>
  <li>The total should be inclusive, so GetNumberOfWeekdays(new DateTime(2009,11,30), new DateTime(2009,12,4)) should equal 5, that's Monday to Friday.</li>
  <li>Should allow for leap days</li>
  <li>does NOT just iterate through all the dates between whilst counting the weekdays.</li>
  </ol>
  
  <p>I've found a <a href="https://stackoverflow.com/questions/1617049/calculate-the-number-of-business-days-between-two-dates">similar question</a> with an <a href="https://stackoverflow.com/questions/1617049/calculate-the-number-of-business-days-between-two-dates/1619375#1619375">answer</a> that comes close but is not correct</p>