Reputation: 6482
I have a string with value
"\\test\mxf\123456\123456789.abc"
When I use
var x= @"\\test\mxf\123456\123456789.abc"
I am getting an output as
"\\test\\mxf\\123456\\123456789"
How to get the string as a path i.e "\\test\mxf\123456\123456789.abc"
without the double slashes getting replaced?
Upvotes: 0
Views: 938
Reputation: 911
Try this,
var x = "\"" + @"\\test\mxf\123456\123456789.abc" + "\"";;
Console.WriteLine(x);
Upvotes: 0
Reputation: 30052
Use Console to check strings and not the debugger :
var x= @"\\test\mxf\123456\123456789.abc"
Console.WriteLine(x); // output is \\test\mxf\123456\123456789.abc
Upvotes: 6