Skip to content

Instantly share code, notes, and snippets.

@felipeabajo
Last active November 14, 2023 14:32
Show Gist options
  • Save felipeabajo/14c9de0db0aad2815b6434e93d91a87c to your computer and use it in GitHub Desktop.
Save felipeabajo/14c9de0db0aad2815b6434e93d91a87c to your computer and use it in GitHub Desktop.
Snippets for working with paths in C#
/*PATHS*/
/*Special folders*/
string FolderPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments); //C:\Users\Public\Documents in Windows
/*GENERATION OF PATHS*/
/*Paths of documents*/
string FilePath = System.IO.Path.Combine(folderName, fileName);
string FilePath = System.IO.Path.Combine(destinationFolderPath, selectedWord + " - " + selectedTypeOfProject + ".pdf");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment