title: Update a progressbar when steps are arbitrary
body: <p>I am writing a C# application where I process lines in a file. The file may have 2 lines, 30, 80, maybe over a hundred lines. </p>
  
  <p>The lines are stored in a list, so I can get the line count from <code>myFileList.Count</code>. The progressbar only takes <code>int</code> as arguments to the value, so if I have line number of say 50, I could easily do</p>
  
  <pre><code>int steps = 100/myFileList.Count 
  progress += steps; 
  updateProgressBar ( progress );
  </code></pre>
  
  <p>But what if my file has say 61 lines: 100/61 = 1,64, hence <code>int steps</code> will be equal to 1 and my progress bar will stop at 61 percent. How can I do this correctly? </p>