Search This Blog

Monday, September 29, 2014

GetDrives C# Example

C# > Files > DriverInfoGetDrives 

Retrieves the drive names of all logical drives

Example:
DriveInfo[] allDrives = DriveInfo.GetDrives();

foreach (DriveInfo d in allDrives)
{
   tvLeft.Nodes.Add(d.Name);  
}