c# get md5 hash of an embedded resource before extracting it
问题 We have an embedded resource and need to get the md5 hash of the file before extracting it in order to know if it is different from an already existing file, (becouse if we have to extract it to compare them it would be better to replace the file directly) Any suggestion is appreciated 回答1: What sort of embedded resource is it? If it's one you get hold of using Assembly.GetManifestResourceStream() , then the simplest approach is: using (Stream stream = Assembly.GetManifestResourceStream(...))