I C#, how to determine original file type. I know we can figure out through file extension but we cannot trust file extension given that extension can be renamed.
For e.g. let suppose file original extension is .msi or .exe but someone can rename it to .pdf. So in these scenario we cannot figure out file type just basis of extension.
File mime-type also cannot be use to determine file type given that they are not unique across file extensions.