判断两个文件是否相同,只需要判断文件内容是否相同即可
public bool CheckEqual(string path, string pathtwo)
{
StreamReader sr1 = new StreamReader(path);
StreamReader sr2 = new StreamReader(pathtwo);
if (object.Equals(sr1.ReadToEnd(), sr2.ReadToEnd()))
{
return true;
}
else
{
return false;
}
}