//Add these namespace using System.IO; using System.Security.Cryptography; // The function that will return MD5 CheckSUM for a file string ComputeMD5CheckSum(string fileName) { FileStream file = new FileStream(fileName, FileMode.Open); MD5 md5 = new MD5CryptoServiceProvider(); byte[] retVal = md5.ComputeHash(file); file.Close(); string str = ""; for (int i = 0; i < retVal.Length; i++) { str += retVal[i].ToString(); } return str; }