title: How to remove a blank line at the end of a text file after deleting a line?
body: <p>I borrowed four lines of code from Stack Overflow, regarding removing a specific line from my text file in vb.net. Here they are:</p>
  <pre><code> Dim delLine As Integer = 4
   Dim lines As List (Of String) = File.ReadAllLines (&quot;c:\essai.librarie&quot;, Encoding.UTF8).ToList()
   lines.RemoveAt(delLine - 1)
   File.WriteAllLines(&quot;c:\outfile.librairie&quot;, lines, Encoding.UTF8)
  </code></pre>
  <p>It works fine but after deleting my line 4, I have an empty line in the last position of the file with the number 11! (see screenshot).</p>
  <p>How to avoid this blank line?</p>
  <p><a href="https://i.stack.imgur.com/2epzb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2epzb.jpg" alt="enter image description here" /></a></p>