08-02-16, 01:39 AM
(آخر تعديل لهذه المشاركة : 08-02-16, 03:16 AM {2} بواسطة silverlight.)
PHP كود :
Public Shared Function GetLocalDrives() As List(Of IO.DriveInfo)
Dim list As List(Of IO.DriveInfo) = New List(Of IO.DriveInfo)()
Dim drives As IO.DriveInfo() = IO.DriveInfo.GetDrives()
For i As Integer = 0 To drives.Length - 1
Dim di As IO.DriveInfo = drives(i)
list.Add(di)
Next
Return New List(Of IO.DriveInfo)(list)
End Function
PHP كود :
For Each drive As IO.DriveInfo In GetLocalDrives()
Me.ListBox1.Items.Add(drive.Name & ":" & drive.DriveType.ToString)
Next

