Determine if time falls in designated hour range
<p>I am new at C#. I'd like to check whether a time is between 2 given hours, and if so then do something. Can anyone give me an example?</p>

<p>pseudocode example:</p>

<pre><code>int starthour = 17;
int endhour = 2;

if ( hour between starthour and endhour){
    dosomething();
}
</code></pre>

<p>How do I write a check on whether <code>hour</code> is between <code>starthour</code> and <code>endhour</code>? In C#, the time is returned in AM/PM format so I don't know if it will understand the <code>17</code> number as "5 PM".</p>
