For Each…Next Loop in Visual Basic .NET

How to list the directory of the C:\ drive of your computer
I am using System.IO.Directory.GetDirectories() get the list files under C:\ drive. This method will return the array of string

So I can loop through the array of string using For… Each

Output in console
C:\data
C:\Documents and Settings
C:\PerfLogs
C:\Program Files
C:\Program Files (x86)
C:\ProgramData
C:\Recovery
C:\System Volume Information
C:\Users
C:\Windows

Leave a Reply

Your email address will not be published. Required fields are marked *