Live Chat Icon For mobile
Live Chat Icon

I want to iterate through both files and folders in a given folder. Is this possible

Platform: WinForms| Category: General IO

Yes



string[] contents = Directory.GetFileSystemEntries('folderName');
			foreach(string s in contents)
				Console.WriteLine(s);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.