If I need to get a list of files of a particular type or extension in a given directory, how can I get that list using C# code. Here is an example where the code looks for files in the current directory with .txt extension and writes the list to the console.
Using StreamReader class in C# can be fun and very handy to do some important tasks. Here is an example which will help you to understand how to use the StreamReader to read through a text file and also write it to the console line by line.
Here is an example of using StreamReader and StreamWriter class in C# to Read a number of text files from the source location and writing the contents of all the text files into a single Final Large file.
1. How to get the Count of line Numbers in a file using StreamReader in C#
2. How to get Line Count of a File using StreamReader in C#