Reputation: 9
IO.Path.GetTempFileName() in a c# application it's supposed to create a temp file and return the full path and filename, but the problem that i'm facing is that it ruturns the path with a double slash, just like this:
C:\\Users\\user\\AppData\\Local\\Temp\\tmp4230.tmp
Is it correct? or should it return something like this:
C:\Users\user\AppData\Local\Temp\tmp4230.tmp
thanks in advance
Upvotes: 0
Views: 1278
Reputation: 4344
"\" is escape char having "\" in string require to mark it as verbatim or add double "\".
see What is the difference between a regular string and a verbatim string?
Upvotes: 1
Reputation: 2135
It's not, you're just looking in the wrong place. Try to write returned value to the file, you'll see there are no double slash
Upvotes: 0