GetHashCode()
当函数使用 code which 返回某些东西时,它有什么特殊含义contains ^ symbol
吗?
public class ClassProp
{
public int Prop1 { get; set; }
public int Prop2 { get; set; }
public int Prop3 { get; set; }
public int Prop4 { get; set; }
public int Prop5 { get; set; }
public override int GetHashCode()
{
return Prop1.GetHashCode() ^ Prop2.GetHashCode() ^
Prop3.GetHashCode() ^ Prop4.GetHashCode() ^ Prop5.GetHashCode();
}
}