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.