I wanna write program that detects flash drives.
But there's a problem.
Code:
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.DriveType == DriveType.Removable)
{
}
}
It works well, but it detects cdrom too. How to prevent it?