/// <summary> /// Returns true if both classes contain the same gradient. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { TExcelGradient o2 = obj as TExcelGradient; if (o2 == null) { return(false); } if (GradientType != o2.GradientType) { return(false); } if (Stops == null) { return(o2.Stops == null); } if (o2.Stops == null) { return(false); } if (Stops.Length != o2.Stops.Length) { return(false); } for (int i = 0; i < Stops.Length; i++) { if (Stops[i] != o2.Stops[i]) { return(false); } } return(true); }
/// <summary> /// Creates a deep copy ot this object. /// </summary> /// <returns></returns> public TExcelGradient Clone() { TExcelGradient Result = (TExcelGradient)MemberwiseClone(); if (Stops != null) { Result.Stops = (TGradientStop[])Stops.Clone(); } return(Result); }