更新时间:2021-06-29 02:06:46
这将让所有连接的可移动驱动器(包括USB驱动器)的:
This will get all of the removable drives attached (including USB drives):
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.DriveType == DriveType.Removable)
{
// Code here
}
}
获取USB驱动器制造商可能会更加困难,你可能需要使用WMI。
Getting the USB drive manufacturer may be more difficult, and you may need to use WMI.
修改:下面是关于阅读的USB驱动器的信息2链接:
Edit: Here are 2 links on reading USB drive information: