Environment.SpecialFolder is an enum whose values encompass all special directories in Windows.
AdminTools
ApplicationData
CDBurning
CommonAdminTools
CommonApplicationData
CommonDesktopDirectory
CommonDocuments
CommonMusic
CommonOemLinks
CommonPictures
CommonProgramFiles
CommonProgramFilesX86
CommonPrograms
CommonStartMenu
CommonStartup
CommonTemplates
CommonVideos
Cookies
Desktop
DesktopDirectory
Favorites
Fonts Recent
History
InternetCache
LocalApplicationData
LocalizedResources
MyComputer
MyDocuments
MyMusic
MyPictures
MyVideos
NetworkShortcuts
Personal
PrinterShortcuts
ProgramFiles
ProgramFilesX86
Programs
Resources
SendTo
StartMenu
Startup
System
SystemX86
Templates
UserProfile
Windows
The following method returns the .NET Framework directory:
using System;
using System.IO;
using System.Linq;
using System.Text;
class Program
{
static void Main()
{
Console.WriteLine(System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory());
}
}
The output:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\