System.IO.Directory.GetLogicalDrives Method

Retrieves the names of the logical drives on this computer in the form "<drive letter>:\".

Syntax

public static string[] GetLogicalDrives ()

Returns

The logical drives on this computer.

Remarks

GetLogicalDrives returns all of the accessible drives on a particular machine, including the floppy drive and any optical drives.

For a list of common I/O tasks, see Common I/O Tasks.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0