How can I get the directory name for ‘My Documents’ folder and other system directories?

Platform: WinForms|Category: Win32

Mark Boulter (Microsoft) gives code in a posting to the DOTNET newsgroup at DOTNET@DISCUSS.DEVELOP.COM.

You can also use the System.Environment class to get at this information.

MessageBox.Show(Environment.GetFolderPath(Environment.SpecialFolder.Personal));