Languages
[Edit]
EN

C# / .NET - list all dirs and files below given directory

6 points
Created by:
Mohammad-Oneal
327

In C# / .NET it is possible to list directories and files from directory in following ways.

1. Get files and directories from directory example

Edit

Output:

2. Get and filter files from directory example

Edit

Output:

3. Get recursively files and directories from directory example

Edit

Output:

References

Edit
  1. Directory.GetFiles Method - Microsoft Docs
  2. Directory.GetDirectories Method - Microsoft Docs
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

C# / .NET - file API

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join