You could use:
from driveInfo in DriveInfo.GetDrives()
where driveInfo.DriveType == DriveType.Removable && driveInfo.IsReady
select driveInfo.RootDirectory.FullName
More Related Contents:
- Working with USB devices in .NET
- HashSet vs. List performance
- System.Timers.Timer vs System.Threading.Timer
- What is the preferred way to find focused control in WinForms app?
- Access parent DataContext from DataTemplate
- NHibernate ISession Flush: Where and when to use it, and why?
- What’s the difference between KeyDown and KeyPress in .NET?
- Call and Callvirt
- What is the ‘page lifecycle’ of an ASP.NET WebForm? [closed]
- Replacing the WPF entry point
- How do I override CopyLocal (Private) setting for references in .NET from MSBUILD
- How to get COM Server for Excel written in VB.NET installed and registered in Automation Servers list?
- Overcome OS Imposed Windows Form Minimum Size Limit
- Microsoft Roslyn vs. CodeDom
- Alternatives to AutoMapper [closed]
- Wix and .NET Framework (prerequisites)
- Procedure expects parameter which was not supplied
- Data Access Layer design patterns
- General Rule for When to Implement IDisposable
- How to use XPath with XElement or LINQ?
- Sorting a Data Table
- How to write an Excel workbook to a MemoryStream in .NET?
- Why does NotImplementedException exist?
- Programmatically add trusted sites to Internet Explorer
- Does ODP.NET require Oracle Client installation
- Finding the hosting PropertyInfo from the MethodInfo of getter/setter
- IIS: web applications warmup
- .NET 4 fails to install because SECUREREPAIR fails to CreateContentHash of file SetupResources.dll: for computing hash Error: 997
- Get Current .NET CLR version at runtime?
- InvalidOperationException: Unable to resolve service for type ‘Microsoft.AspNetCore.Http.IHttpContextAccessor’