I am trying to full-proof my tool, and I noticed that if you pass a database file to streamreader, it will read the file without a problem,. I would like to only be able to open text files (.txt, .xml, .json, etc.). I want the tool to exit if it tries to read an excel document or something not written in plain text.
Thanks, Nick