If would be easy, but there is one problem with "files of the same extension" and Directory.GetFiles — it does not work as one can expect.
You will find the explanation and the resolution here:
Directory.Get.Files search pattern problem[
^].
For reading the file, use
System.IO.StreamReader
, in particular,
System.IO.StreamReader.ReadToEnd
.
—SA