示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CanConvert.GetHashCode();
         hashCode = (hashCode * 397) ^ (SameType != null ? SameType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CantConvert.GetHashCode();
         hashCode = (hashCode * 397) ^ (SubclassAndClass != null ? SubclassAndClass.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ AnotherNumberCanConvert.GetHashCode();
         hashCode = (hashCode * 397) ^ (CantAssign != null ? CantAssign.GetHashCode() : 0);
         return(hashCode);
     }
 }
示例#2
0
        // Internals

        private bool Equals(Destination other)
        {
            return(CanConvert == other.CanConvert && string.Equals(SameType, other.SameType) && CantConvert.Equals(other.CantConvert) && Equals(SubclassAndClass, other.SubclassAndClass) && string.Equals(FirstName, other.FirstName) && AnotherNumberCanConvert == other.AnotherNumberCanConvert && Equals(CantAssign, other.CantAssign));
        }