Home » FAQ » WinForms » General IO » I want to iterate through both files and folders in a given folder. Is this possible
Yes
string[] contents = Directory.GetFileSystemEntries('folderName'); foreach(string s in contents) Console.WriteLine(s);
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with