stop hashing operation using filestream
问题 I'm having this piece of code that computes the MD5 hash for a given input file. public static String ComputeMD5(String filename) { using (var md5 = MD5.Create()) { try { using (var stream = File.OpenRead(filename)) { return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", "").ToLower(); } } catch (Exception) { // File is not accessible, return String.Empty return String.Empty; } } } I'm running this time consuming operation in a separate thread. For very big files this operation