title: Check if datetime instance falls in between other two datetime objects
body: <p>I would like to know a simple algorithm to check if the given instance of <code>datetime</code> lies between another two instances in <code>C#</code>.</p>
  <p><strong>Note:</strong></p>
  <p>I skimmed though this <a href="https://stackoverflow.com/questions/2634127/how-do-i-check-if-a-given-datetime-object-is-between-two-datetimes">How do I check if a given datetime object is &quot;between&quot; two datetimes?</a> and it was for python and many more for php. Most of the other questions were regarding difference between the two.</p>
  <p><strong>Details:</strong></p>
  <p>I am more specific about the time, date does not matter to me. For example i got <code>DataBase</code> entry for a staff who works between <code>10:00</code> Am - <code>9:00</code> Pm and I would like to know which staff is engaged in class at the given time like <code>2:00 Pm</code>. Now this would return me the staff's details who are engaged at this time.</p>
  <p><strong>Edit</strong></p>
  <p>After accepting the answer(been more than year back), i realized i had incorrectly described the problem. But all i think that was to be done back then was to do date and time comparison. So answers by both Jason and VikciaR work.</p>