title: Verify that c# Embedded Resource matches file
body: <p>I know that this is may be a question without one 'right' answer</p>
  
  <p>I have a C# windows application that has an embedded resource included in the assembly. I've been trying to come up with a way to compare the contents of my resource stream to determine if the contents of that stream matches a particular file on the file system.</p>
  
  <p>e.g.</p>
  
  <pre><code>using(var resourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(@"Manifest/Resource/Path/thing.exe"))
  using(var fileStream = new FileStream(@"File/System/Path/thing.exe", FileMode.Read))
      // Compare Contents (thing.exe may be an older version)
      if(CompareStreamContents(resourceStream, fileStream))
      {
          /* Do a thing */
      }
      else
      {
          /* Do another thing*/
      }
  </code></pre>
  
  <p>Is there a better way than simply doing a byte-by-byte comparison? Thoughts? (and thanks in advance!)</p>