There are some special directories easily available through use of the Environment.SpecialFolder enumeration: ApplicationData, Favorites, Personal, Programs, StartMenu and Startup. But it is a bit harder to e.g. get the current directory of the running application.
System.IO.Directory.GetCurrentDirectory() doesn’t work; it will give you an NotImplementedException at runtime.

To get it as string type:

Note the GetModules()[0] if you have more than one module.
To get the special folders:


(I give up trying to format the text, this wordpress text editor is by far the worst  I’ve ever tried!)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: