File name has two backslashes C#

后端 未结 5 1444
甜味超标
甜味超标 2021-01-21 23:06

There is probably an easy answer for this, but when I added DateTime.Now.ToString() to my fileName it adds an extra \\ for every \\ I have so C:\\Temp

5条回答
  •  花落未央
    2021-01-21 23:33

    It is actually the forward slashes that are illegal in filename. Replace the forward slashes with something legal and try again.

提交回复
热议问题