title: How to check if a file has been modified in c#
body: <p>I want to prompt a user to save a file when some modification has been done to it but the problem is i can't for the life of me do that. </p>
  
  <p>Some people have suggested using <code>FileInfo</code> class but it only gives you the <code>lastWriteTime</code>, <code>LastAccessTime</code> and <code>CreationTime</code>. </p>
  
  <p>I would like to use <code>FileInfo</code> class rather than <code>FileSystemWatcher</code> to check for modifications but how?</p>
  
  <p>Example: Say a user has edited a file, within my program, that they loaded and clicks EXIT, i want a way to check whether any modifications were done on the file. If none, exit. If some, prompt user to save the file. So how do i check for modifications on that FILE? </p>