Retrieves the names of the logical drives on this machine in the form "C:\".
[Visual Basic] Public Shared Function GetLogicalDrives() As String () [C#] public static string[] GetLogicalDrives(); [C++] public: static String* GetLogicalDrives() []; [JScript] public static function GetLogicalDrives() : String[];
The logical drives on this machine.
Exception Type | Condition |
---|---|
IOException | An I/O error occurs. |
SecurityException | The caller does not have the required SystemInfoPermission. |
NGWS Runtime Security:
SecurityPermissionFlag | Permission to use unmanaged code. |
EnvironmentPermission | Unrestricted access to environment variables. |