How to delete a line from a text file with line break and copy the content to another file? : <p>What I need are:-</p>

<ol>
<li>delete a line from file <strong>with line break</strong>.</li>
<li>copy the content to another file.</li>
</ol>

<p>Assume the file content is as the following:-</p>

<pre><code>sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
111111111
sometextsometextsometext
sometextsometextsometext
</code></pre>

<p>I wanna delete the line that contains <code>111111111</code> so I used the next code:-</p>

<pre><code>string content = File.ReadAllText(sOutputPathFileFrom);
content = content.Replace("111111111", "");
File.AppendAllText(sOutputPathFileTo, content);
</code></pre>

<p>The result of sOutputPathFileTo is as following:-</p>

<pre><code>sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
sometextsometextsometext

sometextsometextsometext
sometextsometextsometext
</code></pre>

<p>The desired result is as next:-</p>

<pre><code>sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
sometextsometextsometext
</code></pre>

<p>Note:-
<code>sOutputPathFileFrom</code> &amp; <code>sOutputPathFileFrom</code> are variables carries the paths of from and to files.</p>
