public bool Equals(Cmyk other) { return(Cyan.Equals(other.Cyan) && Magenta.Equals(other.Magenta) && Yellow.Equals(other.Yellow) && Key.Equals(other.Key)); }
public override bool Equals(object obj) { if (!(obj is CmykColor)) { return(false); } CmykColor c2 = (CmykColor)obj; return(Cyan.ApproxEquals(c2.Cyan) && Magenta.ApproxEquals(c2.Magenta) && Yellow.ApproxEquals(c2.Yellow) && Black.ApproxEquals(c2.Black)); }
public override string ToString() { return(String.Format("C={0}, M={1}, Y={2}, K={3}", new string[] { Cyan.ToString(), Magenta.ToString(), Yellow.ToString(), Black.ToString(), })); }
public override int GetHashCode() { return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Black.GetHashCode()); }
/// <summary> /// Returns a System.String object that represents the current object. /// </summary> /// <returns>Text as a sequence of Unicode characters</returns> public override string ToString() { return(Cyan.ToString() + "\n" + Magenta.ToString() + "\n" + Yellow.ToString() + "\n" + Keycolor.ToString()); }
/// <summary> /// Plays the role of a hash function of a certain type. /// </summary> /// <returns>Integer number</returns> public override int GetHashCode() { return(Cyan.GetHashCode() ^ Magenta.GetHashCode() ^ Yellow.GetHashCode() ^ Keycolor.GetHashCode()); }