01.using System; 02.using System.Collections.Generic; 03.using System.ComponentModel; 04.using System.Data; 05.using System.Drawing; 06.using System.Text; 07.using System.Windows.Forms; 08. 09.namespace GetDeskDirectory 10.{ 11. public partial class Form1 : Form 12. { 13. public Form1() 14. { 15. InitializeComponent(); 16. } 17. 18. private void button1_Click(object sender, EventArgs e) 19. { 20. string dir = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); 21. MessageBox.Show("桌面的路径是"+dir); 22. } 23. } 24.}
获取当前系统桌面路径(C# 代码)
最新推荐文章于 2020-07-17 15:31:43 发布