Delete Lines in a textfile
<p>Hi I have a text file with table schema and data when user checks not schema required then i need to delete  schema and leave the data . I am using StreamReader to read the file and checking one condition and it should delete all the lines in the file till it satisfies my condition . 
Let say if i am checking </p>

<pre><code>  using (StreamReader tsr = new StreamReader(targetFilePath))
        {
            do
            {
                string textLine = tsr.ReadLine() + "\r\n";

                {
                    if (textLine.StartsWith("INSERT INTO"))
                    {

                         // It should leave these lines 
                        // and no need to delete lines 
                    }

                    else
                    {
                      // it should delete the lines 
                    }

                }
            }
            while (tsr.Peek() != -1);
            tsr.Close();  
</code></pre>

<p>Please suggest me how to delete lines and note if textline finds "InsertInto" it should not delete any content from there .            </p>
