I have a path string, for example c:\user\test\test.jpg , how can I make it c:\\user\\test\\test.jpg ?
c:\user\test\test.jpg
c:\\user\\test\\test.jpg
string s = s.Replace(@"\", @"\\");
Try the following:
string path = @"c:\user\test\test.jpg";
you only need escaping if you use a string literal in your code. why do you need automatic shielding anyway. you can use @ in front of a literal that does not require escaping.
Source: https://habr.com/ru/post/1333538/More articles:Java, let CookieHandler work with only one instance - javaAm I abusing the built-in modifier? - f #How can I delete a specific item in the priority queue? - javaCPAN restriction for updating non-core modules only - perlAdding WP7 ContextMenu programmatically - windows-phone-7Predict the values โโof sinusoidal noise - rUnable to cast to one connection using Atmosphere - atmosphereHTML 5 and its learning resources - html5what are the best source things i need to know to go to asp.net development - c #RMI java does not create skeleton class - javaAll Articles