FileSystem.Drives Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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; }
static member Drives : System.Collections.ObjectModel.ReadOnlyCollection<System.IO.DriveInfo>
Public Shared ReadOnly Property Drives As ReadOnlyCollection(Of DriveInfo)
Property Value
A read-only collection of all available drives as DriveInfo objects.
Examples
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
Remarks
This property returns all logical drives.
Applies to
See also
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.