VB.NET
ListBox1.Items.AddRange(System.Environment.GetLogicalDrives())
C#ListBox1.Items.AddRange(System.Environment.GetLogicalDrives());
DriveInfoオブジェクトを利用してドライブ一覧を取得する方法VB.NET
Dim drives As System.IO.DriveInfo() = System.IO.DriveInfo.GetDrives()
For Each d As System.IO.DriveInfo In drives
'"C:\"などのドライブ名を表示
Console.WriteLine(d.Name)
Next d
C#System.IO.DriveInfo[] drives = System.IO.DriveInfo.GetDrives();
foreach (System.IO.DriveInfo d in drives)
{
//"C:\"などのドライブ名を表示
Console.WriteLine(d.Name);
}