System.IO.DriveInfo[] disk = System.IO.DriveInfo.GetDrives();
            foreach (System.IO.DriveInfo di in disk)
            {
                this.listBox1.Items.Add(di.Name);
            }

得到的结果c:\

d:\

f:\

g:\

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-07-19
  • 1970-01-01
  • 2021-09-14
相关资源
相似解决方案