Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created September 9, 2020 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csharpforevermore/93aa52cab56ad8c7d6fbb1281a19b48d to your computer and use it in GitHub Desktop.
Save csharpforevermore/93aa52cab56ad8c7d6fbb1281a19b48d to your computer and use it in GitHub Desktop.
C# - DotNet - Get a folder to save files in
// C:\Users\cshar\AppData\Local\Temp\tmp4550.tmp
Path.GetTempFileName();
// C:\Users\cshar\AppData\Roaming\DateLinks.csv
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "DateLinks.csv");
// See https://www.mikesdotnetting.com/article/302/server-mappath-equivalent-in-asp-net-core for DotNetCore method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment