public static string DataRowToHash(this DataRow row) { StringBuilder result = new StringBuilder(); foreach (DataColumn column in row.Table.Columns) { if (row[column.ColumnName] == null || row[column.ColumnName] == DBNull.Value) { result.Append(column.ColumnName.ToString() + "NULL"); } else { result.Append(column.ColumnName.ToString() + row[column.ColumnName].ToString()); } } return(CryptoUtility.ComputeMD5Hash(result.ToString())); }