snippetcsharpCritical
How to get a path to the desktop for current user in C#?
Viewed 0 times
howtheforcurrentuserpathdesktopget
Problem
How do I get a path to the desktop for current user in C#?
The only thing I could find was the VB.NET-only class
How can I do this in C#?
The only thing I could find was the VB.NET-only class
SpecialDirectories, which has this property:My.Computer.FileSystem.SpecialDirectories.DesktopHow can I do this in C#?
Solution
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);Code Snippets
string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);Context
Stack Overflow Q#634142, score: 965
Revisions (0)
No revisions yet.