title: How do you check a file type when there is no extension in c#
body: <p>How do you check a file type when there is no extension in c#</p>
  
  <p>For instance, I have files with no extension, that are either .mp4 or .flv format (just no extension). I plan on converting these video files to audio files however I would like to determine the file type before I start converting it. Is there a way to do this in C#? </p>
  
  <p>I was thinking that maybe I could just rename the file to name.mp4, then perform some task on the file that would either 
  A) succeed, meaning that the file was indeed .mp4, or 
  B) fail, in which case I could then rename it to .flv</p>
  
  <p>then convert the file as the appropriate extension. Is there a native process in c# that can look at .mp4 properties or .flv properties? I do not want to rename the file to .mp4 and then open it in a third party application, such as Windows Media Player, in order to see if I named it correctly.</p>