111,125
社区成员
发帖
与我相关
我的任务
分享 struct int128 : IEquatable<int128>
{
public uint Int0;
public uint Int1;
public uint Int2;
public uint Int3;
public bool Equals(int128 other)
{
return ((Int0 ^ other.Int0) | (Int1 ^ other.Int1) | (Int2 ^ other.Int2) | (Int3 ^ other.Int3)) == 0;
}
public override int GetHashCode()
{
return (int)(Int0 ^ Int1 ^ Int2 ^ Int3);
}
public override bool Equals(object obj)
{
return Equals((int128)obj);
}
}
new System.Collections.Generic.HashSet<int128>(...);