我想检测可移动驱动器是笔式驱动器还是外部硬盘。
我的代码如下:
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.DriveType == DriveType.Removable)
{
//Here I want to detect whether removable drive is
//Pendrive or External Hard Disk
}
}
非常感谢您的建议。
答案 0 :(得分:0)