How to get a path to the desktop for current user in C#? How to get a path to the desktop for current user in C#? windows windows

How to get a path to the desktop for current user in C#?


string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);


// Environment.GetFolderPathEnvironment.GetFolderPath(Environment.SpecialFolder.ApplicationData); // Current User's Application DataEnvironment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); // All User's Application DataEnvironment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles); // Program FilesEnvironment.GetFolderPath(Environment.SpecialFolder.Cookies); // Internet CookieEnvironment.GetFolderPath(Environment.SpecialFolder.Desktop); // Logical DesktopEnvironment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); // Physical DesktopEnvironment.GetFolderPath(Environment.SpecialFolder.Favorites); // FavoritesEnvironment.GetFolderPath(Environment.SpecialFolder.History); // Internet HistoryEnvironment.GetFolderPath(Environment.SpecialFolder.InternetCache); // Internet CacheEnvironment.GetFolderPath(Environment.SpecialFolder.MyComputer); // "My Computer" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.MyDocuments); // "My Documents" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.MyMusic); // "My Music" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.MyPictures); // "My Pictures" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.Personal); // "My Document" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); // Program files FolderEnvironment.GetFolderPath(Environment.SpecialFolder.Programs); // Programs FolderEnvironment.GetFolderPath(Environment.SpecialFolder.Recent); // Recent FolderEnvironment.GetFolderPath(Environment.SpecialFolder.SendTo); // "Sent to" FolderEnvironment.GetFolderPath(Environment.SpecialFolder.StartMenu); // Start MenuEnvironment.GetFolderPath(Environment.SpecialFolder.Startup); // StartupEnvironment.GetFolderPath(Environment.SpecialFolder.System); // System FolderEnvironment.GetFolderPath(Environment.SpecialFolder.Templates); // Document Templates