Snippet IT IT News, Programming, Internet and Blogging

7Feb/095

C# – Loop all files in directory and it’s sub-directories

Recently I need to write some code to read all files in a directory and it's sub-directories. There are simple way and difficult way (Not very difficult actually). The simple way will be writing a function that reads all files in the directory and call the function again recursively for each sub-directory in that directory.