Guest PaulRuebens Posted May 22, 2002 Posted May 22, 2002 Okay I'm doing a basic program to see how VB NET works. It simple in that I want to just list the drives on my machine. So far here is my code dim sDrives() as String dim i as integer sDrives = Directory.GetlogicalDrives() For i = 0 to Ubound(sDrives) Console.Writeline(sDrives(i)) Next Problem I'm getting is that I get an error back that says "Directory not declared"....... did I do something wrong? Thanks! Quote
Spike Posted May 22, 2002 Posted May 22, 2002 Try this: Dim sDrives() As String Dim i As Integer sDrives = System.IO.Directory.GetLogicalDrives() For i = 0 To UBound(sDrives) Console.WriteLine(sDrives(i)) Next Quote
Guest PaulRuebens Posted May 23, 2002 Posted May 23, 2002 Thanks Spike....... I actually figured out a solution. I love learing new tricks! Anyway At the very TOP of my code I put in Imports System.IO and it worked like I needed it to! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.