The below program will help you to find all special folders using C#. this program fetch values of special folder from environment variable.
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