Sponsored Ad

Sunday, March 13, 2011

How to get Path of All Windows Special Folders using C#

The below program will help you to find all special folders using C#. this program fetch values of special folder from environment variable.

How to get Path of All Windows Special Folders using C#

using System;
using System.IO;

namespace MyApp
{
    class windows_folders_class
    {
        static void Main()
        {
            foreach (Environment.SpecialFolder myfolder in Enum.GetValues(typeof(Environment.SpecialFolder)))
            {
                string mypath = Environment.GetFolderPath(myfolder);
                Console.WriteLine("{0}----{1}", myfolder, mypath);
            }
            Console.Read();
        }
    }
}

No comments:

Post a Comment

Sponsored Ad

Development Updates