Get Desktop Directory

The easiest way to get the path to the desktop directory.


Libraries
using System.Envoriment;

Code Snippet
public static Desktop {
    get { return Environment.GetFolderPath(Environment.SpecialFolder.Desktop); }
}


Implementation

Here is a little example where the string path should contain the full path <code>string path = Desktop;</code>





Comments
  • mode_editWrite a comment



  • forumComments




Embed Code

We provide special containers which include the full snippet and a link to this site. So for example when you make a tutorial and you are using code from this site, you can use one of the following snippet embeddings:

Load Preview Get Code Close Preview







    Share
    Rating
    thumb_up 1 thumb_down
    Author
    Thorolus

    I'm the head developer and co-founder of GlovilGames Studios (glovilgames.com) and other platforms GlovilGames created, like vsnippets.com, worth-calculator.net, python-obfuscator.com and some mobile apps and games.

    Tags
    Desktop
    Windows
    Directory



    Informations

    posted on 2016-09-12 20:12:27

    viewed 142 times

    snippet's UUID is 57d6f00b1b393

    Similar Snippets