C#获取逻辑驱动器文件系统

DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
    {
       textBox2.Text 
= textBox2.Text + d.Name + d.DriveFormat + Environment.NewLine;
    }
原文地址:https://www.cnblogs.com/wangbin5542/p/1747546.html