Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chrisnas
Created February 11, 2019 10:56
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 chrisnas/29870bf37601659d8508f73ecc0c5187 to your computer and use it in GitHub Desktop.
Save chrisnas/29870bf37601659d8508f73ecc0c5187 to your computer and use it in GitHub Desktop.
private static string GetUniqueFilename(int pid)
{
var now = DateTime.Now;
string filename = Path.Combine(Environment.CurrentDirectory,
$"{pid.ToString()}_{now.Year}{now.Month}{now.Day}_{now.Hour}{now.Minute}{now.Second}.csv"
);
return filename;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment