How can I find the type of the file from the directory C#? I am reading the files from the directory and would like to find out if the file type is an image. Please let me know.
Thanks..
One way to determine the file type (presuming you dont just want to use the GetExtension() method) is to use File Magic Numbers, here and here.
TrIDNet has a great XML database of magic numbers.