My TSQL query return a string like this :
a\path\to\file.xml
And I want to put it in a string like this :
string path = reader.GetString(0); (return the query result of the first field => "a\path\to\file.xml")
so when I want to use path
I have got this :
Console.WriteLine(path); //Output : `apathtofile.xml`
But I want the value like : a\path\to\file.xml
.
I already try this because i think I have to double the backslash in the string:
path = reader.GetString(0).Replace("\\", "\\\\"); -> do nothing
path = reader.GetString(0).Replace(@"\", @"\\\"); -> do nothing
path = Regex.Replace(reader.GetString(0), "\\", "\\\\") -> analyse de "\" - \ non conforme à la fin du modèle
path = Regex.Replace(reader.GetString(0), @"\", @"\\\") -> analyse de "\" - \ non conforme à la fin du modèle
French installation -> french error message. sory