Users Pricing

forum

Home Forums Get list of USB in winform using c#? – MindStick

Get list of USB in winform using c#?

Aaron Douglas 4489 16 Oct 2013

I have tried the below line of code to get the USB devices from the computer.

 foreach (DriveInfo driveInfo in DriveInfo.GetDrives())

 {
     if (driveInfo.DriveType == DriveType.Removable)
     {
        comboBoxUSB.Items.Add(driveInfo.Name);
     }
 }
comboBoxUSB is a combobox.. here i am getting this :

 E:/
 G:/

but not getting the device name, like :

 E:/Mindstick 

something like this, how can i get this? is it possible to get this?

please help!


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md