public override int GetHashCode() { int hashCode = -2043694805; hashCode = hashCode * -1521134295 + Ambient.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <Color> .Default.GetHashCode(Color); hashCode = hashCode * -1521134295 + Diffuse.GetHashCode(); hashCode = hashCode * -1521134295 + Shininess.GetHashCode(); hashCode = hashCode * -1521134295 + Specular.GetHashCode(); return(hashCode); }
public override int GetHashCode() { return (Color.GetHashCode() ^ Ambient.GetHashCode() ^ Diffuse.GetHashCode() ^ Specular.GetHashCode() ^ Shininess.GetHashCode() ^ Pattern.GetHashCode() ^ Reflective.GetHashCode() ^ Transparency.GetHashCode() ^ RefractiveIndex.GetHashCode()); }
public override int GetHashCode() { unchecked { var hashCode = Color != null?Color.GetHashCode() : 0; hashCode = (hashCode * 397) ^ Ambient.GetHashCode(); hashCode = (hashCode * 397) ^ Diffuse.GetHashCode(); hashCode = (hashCode * 397) ^ Specular.GetHashCode(); hashCode = (hashCode * 397) ^ Shininess.GetHashCode(); return(hashCode); } }