Exemple #1
0
 public override int GetHashCode()
 {
     return(Anger.GetHashCode() ^
            Disgust.GetHashCode() ^
            Fear.GetHashCode() ^
            Happiness.GetHashCode() ^
            Neutral.GetHashCode() ^
            Sadness.GetHashCode() ^
            Surprise.GetHashCode());
 }
 protected bool Equals(EmotionScores other)
 {
     return(Anger.Equals(other.Anger) &&
            Contempt.Equals(other.Contempt) &&
            Disgust.Equals(other.Disgust) &&
            Fear.Equals(other.Fear) &&
            Happiness.Equals(other.Happiness) &&
            Neutral.Equals(other.Neutral) &&
            Sadness.Equals(other.Sadness) &&
            Surprise.Equals(other.Surprise));
 }
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = Anger.GetHashCode();
         hashCode = (hashCode * 397) ^ Contempt.GetHashCode();
         hashCode = (hashCode * 397) ^ Disgust.GetHashCode();
         hashCode = (hashCode * 397) ^ Fear.GetHashCode();
         hashCode = (hashCode * 397) ^ Happiness.GetHashCode();
         hashCode = (hashCode * 397) ^ Neutral.GetHashCode();
         hashCode = (hashCode * 397) ^ Sadness.GetHashCode();
         hashCode = (hashCode * 397) ^ Surprise.GetHashCode();
         return(hashCode);
     }
 }