win系统环境

            //C:\Users\dsg\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
            string startup =  Environment.GetFolderPath(Environment.SpecialFolder.Startup);

            string common = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
            Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu));
            //C:\Users\dsg\AppData\Roaming
            Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));

Environment.GetFolderPath

你可能感兴趣的:(C#,编程指南)