title: How to identify doc, docx, pdf, xls and xlsx based on file header
body: <p>How to identify doc, docx, pdf, xls and xlsx based on file header in C#?
  I don't want to rely on the file extensions neither MimeMapping.GetMimeMapping for this as either of the two can be manipulated. </p>
  
  <p>I know how to read the header but dont know what combination of bytes can say if a file is a doc, docx, pdf, xls or xlsx. 
  Any thoughts?</p>