title: How do I resolve the type conversion error in below scenario
body: <p>I am going through basics of C# and .NET programming. I have a for loop as shown below.</p>
  
  <pre><code>for(var i = minHour; i &lt;= maxHour; i++)
  </code></pre>
  
  <p>When i replace the above as:</p>
  
  <pre><code>for(var i = minHour; i &lt;= maxHour; i+=0.5)
  </code></pre>
  
  <p>then i see an error as: </p>
  
  <blockquote>
    <p>Cannot implicitly convert type double to int. </p>
  </blockquote>
  
  <p>I do not want to declare <code>i</code> as of type <code>double</code>, please help. I do not know anything about implicit conversion.</p>
  
  <p>Can someone please help me how do I correct this,thanks in advance.</p>