title: day of week and hour of day in a if statement c#
body: <p>I want to do something if the day, and time of the day equal true in a if statement. I have the day part down, just can't figure out the time part out. Let say I wan the time to be 9AM.</p>
  
  <p>Here is what I have so far</p>
  
  <pre><code>var dt_check_monday = DateTime.Now.DayOfWeek;
  if (dt_check_monday == DayOfWeek.Monday &amp;&amp; time_now = DateTime.Now.Hour==9)
  {
  //do something
  }
  </code></pre>
  
  <p>I can't use this I get an error:</p>
  
  <blockquote>
    <p>Operator '&amp;&amp;' cannot be applied to operands of type 'bool' and 'System.TimeSpan'</p>
  </blockquote>
  
  <p>Thanks for any help in advance.</p>