I have a string which I read in from :
TextReader tr = new StreamReader(this.dataPath );
string contents = tr.ReadToEnd();
The value of contents begins with:
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n....."
When I try execute
string styleSheet = "<?xml-stylesheet type=\"text/xsl\" href=\"message.xsl\"?>";
string xmlString = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
TextReader tr = new StreamReader(this.dataPath );
string contents = tr.ReadToEnd();
contents.Replace(xmlString,xmlString + styleSheet );
It absolutely won't find the first occurance of XmlString. Any ideas why?