G
Guest
How can I prune double slashes from a string?
<appSettings>
<add key="pdfroot" value="p:\E-Switch Secure\PDF_dwgs\"/>
</appSettings>
string path = ConfigurationManager.AppSettings["pdfroot"];
path = path.Replace("\\\\", "\\"); // Doesn't work
path = path.Replace(@"\\", @"\"); // Doesn't work
<appSettings>
<add key="pdfroot" value="p:\E-Switch Secure\PDF_dwgs\"/>
</appSettings>
string path = ConfigurationManager.AppSettings["pdfroot"];
path = path.Replace("\\\\", "\\"); // Doesn't work
path = path.Replace(@"\\", @"\"); // Doesn't work