string DownloadDirectoryPath = @"C:\\Program Files\\companyname\\productname\\username\\0\\2012081617085746"
(this is the path i get from the sql server)
but my application uses single slashes so I try to use
DownloadDirectoryPath= DownloadDirectoryPath.Replace(@"\\", @"\");
but this doesn’t work and I get the same string.
any advice?
PLEASE NOTICE:
the value above is what i see in watch window
You’ve not got a @ in front of your value for DownloadDirectoryPath, so it’s not actually got any \\’s in it, only \’s
Do a console.WriteLine(DownloadDirectoryPath) to check what it really has in it.
Edit (OP updated question):
If you hover over the variable containing it (or use the watch window) while debugging then VS will show a single \ as \\ to disambiguate it from an escape character. Write it to the console, a file or some other output to check what it really is.