FileSystem.Drives Propriedade

Definição

Retorna uma coleção somente leitura de todos os nomes de unidade disponíveis.Returns a read-only collection of all available drive names.

public:
 static property System::Collections::ObjectModel::ReadOnlyCollection<System::IO::DriveInfo ^> ^ Drives { System::Collections::ObjectModel::ReadOnlyCollection<System::IO::DriveInfo ^> ^ get(); };
public static System.Collections.ObjectModel.ReadOnlyCollection<System.IO.DriveInfo> Drives { get; }
member this.Drives : System.Collections.ObjectModel.ReadOnlyCollection<System.IO.DriveInfo>
Public Shared ReadOnly Property Drives As ReadOnlyCollection(Of DriveInfo)

Valor da propriedade

ReadOnlyCollection<DriveInfo>

Uma coleção somente leitura de todas as unidades disponíveis como objetos DriveInfo.A read-only collection of all available drives as DriveInfo objects.

Exemplos

Este exemplo exibe os nomes de unidade disponíveis em uma caixa de mensagem.This example displays the available drive names in a message box.

Dim getInfo = System.IO.DriveInfo.GetDrives()
For Each info In getInfo
    MsgBox(info.name)
Next

Comentários

Essa propriedade retorna todas as unidades lógicas.This property returns all logical drives.

Aplica-se a

Confira também