Determine a Drive's Type in Visual Basic
To determine the type of a drive
Use the DriveType property to determine the type, as illustrated in the following code.
Dim cdrive As System.IO.DriveInfo
cdrive = My.Computer.FileSystem.GetDriveInfo("C:\")
MsgBox(cdrive.DriveType.ToString)
To determine the type of a drive
Use the DriveType property to determine the type, as illustrated in the following code.
Dim cdrive As System.IO.DriveInfo
cdrive = My.Computer.FileSystem.GetDriveInfo("C:\")
MsgBox(cdrive.DriveType.ToString)