Special Folder Enumerations

Environment.SpecialFolder is an enum whose values encompass all special directories in 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\
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.