C#获取逻辑驱动器文件系统
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
textBox2.Text = textBox2.Text + d.Name + d.DriveFormat + Environment.NewLine;
}
foreach (DriveInfo d in allDrives)
{
textBox2.Text = textBox2.Text + d.Name + d.DriveFormat + Environment.NewLine;
}