title: Validate time against time interval
body: <p>I have three rules:</p>
  
  <ul>
  <li>A. Time slot between 9am and 3pm    </li>
  <li>B. Time slot betweem 3pm and 7pm </li>
  <li>C. Time slot between 7pm and 9am</li>
  </ul>
  
  <p>Currently I represented them as <code>TimeSpan</code>s</p>
  
  <pre><code>public class Rule
  {
      public string Name {get; set;}
      public TimeSpan From {get; set;}
  }
  
  List&lt;Rule&gt; rules = new List&lt;Rule&gt;()
  {
     new Rule() {From = new TimeSpan(9, 0, 0), Name = "A"},
     new Rule() {From = new TimeSpan(15, 0, 0), Name = "B"},
     new Rule() {From = new TimeSpan(19, 0, 0), Name = "C"}
  };
  </code></pre>
  
  <p>My question is how to validate the time input let's say 9.10pm against that rules? </p>
  
  <p>It should pick third rule.</p>