Writing File to Temp Folder

后端 未结 5 923
别那么骄傲
别那么骄傲 2020-12-08 13:14

I want to use StreamWriter to write a file to the temp folder.

It might be a different path on each PC, so I tried using %temp%\\SaveFile.txt

5条回答
  •  青春惊慌失措
    2020-12-08 13:37

    System.IO.Path.GetTempPath()
    

    The path specified by the TMP environment variable. The path specified by the TEMP environment variable. The path specified by the USERPROFILE environment variable. The Windows directory.

提交回复
热议问题