I want to check for a certain drive letter. I use this to get all the drives on my PC:
Now I want to check if a certain drive exists. I'm not sure how to use the .Contains method here ... can anyone help?
This code doesn't work:
Should I be able to use .Contains or do I have to loop through the collection of drives? Thanks...
Code:
Dim allDrives() As DriveInfo = DriveInfo.GetDrives()This code doesn't work:
Code:
If allDrives.Contains("D:") Then
'do something
End If