コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (StringProp != null ? StringProp.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Int32Prop;
         hashCode = (hashCode * 397) ^ BoolProp.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableInt32PropNoValue.GetHashCode();
         hashCode = (hashCode * 397) ^ NullableInt32PropHasValue.GetHashCode();
         hashCode = (hashCode * 397) ^ (Else != null ? Else.GetHashCode() : 0);
         return(hashCode);
     }
 }
コード例 #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (StringProp != null ? StringProp.GetHashCode() : 0);
         result = (result * 397) ^ IntProp;
         result = (result * 397) ^ DoubleProp.GetHashCode();
         result = (result * 397) ^ BoolProp.GetHashCode();
         result = (result * 397) ^ (ReadOnlyProp != null ? ReadOnlyProp.GetHashCode() : 0);
         result = (result * 397) ^ (WriteOnlyProp != null ? WriteOnlyProp.GetHashCode() : 0);
         result = (result * 397) ^ (IgnoreProp != null ? IgnoreProp.GetHashCode() : 0);
         result = (result * 397) ^ EnumProp.GetHashCode();
         result = (result * 397) ^ MappedProp;
         result = (result * 397) ^ Field?.GetHashCode() ?? 0;
         return(result);
     }
 }