How get count midnight?
<p>I have two date StartDate and EndDate.
I need get count midnight.</p>

<p>My code:</p>

<pre><code>int midnight = (EndDate.DayOfYear - StartDate.DayOfYear) * (Math.Abs(EndDate.Year - StartDate.Year) +1) &gt; 1
</code></pre>

<p>listen to your suggestions to improve the code?</p>

<p><strong>I need the number of transitions from day to day</strong></p>

<p>10.30.2012 11:11 - 11.01.2012 03:10 - have a 2 midnight</p>
