Environment应用

Windows特殊目录

var test = @"C:\ProgramData\Microsoft\Windows\Start Menu\Programs";
foreach (Environment.SpecialFolder item in Enum.GetValues(typeof(Environment.SpecialFolder)))
{
    if (Environment.GetFolderPath(item).Contains(test))
    {
        Console.WriteLine("Name:{0},Value:{1}", item.ToString(), (int)item);
        Console.WriteLine(Environment.GetFolderPath(item));
    }                
}


posted @   wesson2019  阅读(96)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示