0

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.

Nagar
  • 5
  • 2
  • This is a near 1:1 copy of your first question. Please do not do that. Consider _why_ the first one has been closed, then consider what you are asking. – Fildor Sep 07 '20 at 10:56
  • Have you read this: https://stackoverflow.com/questions/34129036/find-out-exact-file-type-in-c-sharp – Harish Sep 07 '20 at 10:58

0 Answers0