title: Check if a decimal number is within a range
body: <p>This might be easy, but I just have to make sure how to do it right. How do I check if a <code>decimal</code> number is within a range?</p>
  
  <p>I have two decimal numbers:</p>
  
  <pre><code>Dim minFactor As Decimal = 1.95
  Dim maxFactor As Decimal = 2.05
  
  Dim varResult as decimal
  </code></pre>
  
  <p>Now I want to check I the calculated <code>varResult</code> is within the range of the two factors. If it is, return <code>true</code>.</p>
  
  <p>How is the most correct practice? </p>
  
  <p>I tried:</p>
  
  <pre><code>Select Case varResult 
      Case 1.95 To 2.05 
          Unit1 = True 
      Case Else 
          Unit1 = False 
  End Select 
  </code></pre>