using System.Security.Cryptography;
using System.Text;//……public static string getFileHash(string filePath)
{
    FileStream fs = new FileStream(filePath, FileMode.Open);
    MD5 md5 = new MD5CryptoServiceProvider();
    byte[] result = md5.ComputeHash(fs);
    string sResult = "";
    foreach(byte b in result)
    {
         sResult += Convert.ToString(b,16);
    }
    fs.Close();
    return sResult;
}
http://community.csdn.net/Expert/topic/5678/5678235.xml?temp=.1412012