示例#1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = CharValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ByteValue.GetHashCode();
         hashCode = (hashCode * 397) ^ SByteValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ShortValue.GetHashCode();
         hashCode = (hashCode * 397) ^ UShortValue.GetHashCode();
         hashCode = (hashCode * 397) ^ IntValue;
         hashCode = (hashCode * 397) ^ (int)UIntValue;
         hashCode = (hashCode * 397) ^ LongValue.GetHashCode();
         hashCode = (hashCode * 397) ^ ULongValue.GetHashCode();
         hashCode = (hashCode * 397) ^ FloatValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DoubleValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DecimalValue.GetHashCode();
         hashCode = (hashCode * 397) ^ DateTimeValue.GetHashCode();
         hashCode = (hashCode * 397) ^ GuidValue.GetHashCode();
         hashCode = (hashCode * 397) ^ StringValue.GetHashCode();
         return(hashCode);
     }
 }
示例#2
0
 /// <summary>
 /// Hash code
 /// </summary>
 public override int GetHashCode()
 {
     return(CharValue.GetHashCode());
 }