Obtener la lista de lectores lógicos

2161 vistas

Usaremos la función GetLogicalDrives de la clase Environment



vbnet
  1. ' Lectores lógicos
  2. Console.WriteLine("Lectores lógicos");
  3. Dim drives() As String = Environment.GetLogicalDrives()
  4. For i As Integer = 0 To drives.Length - 1
  5.   Console.WriteLine(drives(i))
  6. Next