Search and Replace text in file .net 2.0.What Am I missing?
<p>I have an xml file with some placeholder if you like.I need to read it and searchReplace the placeholders.Each placeholder is unique.
I thought of using this method rather than xpath as I have never used it and the xml file is very deep and complex.Thought reading in a string and then replace should do the trick.
Am I missing something obvious?</p>

<p>Why is below not searching and replacing?</p>

<pre><code>  using (StreamReader reader = new StreamReader(path))
        {
            string content = reader.ReadToEnd();
            reader.Close();

            content.Replace("FirstReplace", "test1");
            content.Replace("SecondReplace", "test2");
            content.Replace("ThirdReplace", "test3");
            content.Replace("FourthReplace", "test4");
            content.Replace("FifthReplace", "test5");

            using (StreamWriter writer = new StreamWriter(filePath))
            {
                writer.WriteLine(content);
                writer.Close();
            }
        }
</code></pre>

<p>Any suggestions</p>
