/// <summary> /// Overrides GetHashCode. /// </summary> /// <returns></returns> public override int GetHashCode() { return(BaseO.GetHashCode() + BaseX.GetHashCode() + BaseY.GetHashCode() + BaseZ.GetHashCode()); }
/// <summary> /// Overrides the Equals-method. Two bases are equal, if the parameter BaseO, BaseX,BaseY and BaseZ are equals /// in the sense of <see cref="xyz.Equals"/>. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { if (obj is Base) { Base Other = (Base)obj; return(BaseO.Equals(Other.BaseO) && BaseX.Equals(Other.BaseX) && BaseY.Equals(Other.BaseY) && BaseZ.Equals(Other.BaseZ)); } else if (obj is String) { return(true); } return(base.Equals(obj)); }
{ /// <summary> /// Calculates a string belonging to the Base.e.g. to the unit base you get 0/0/0; 1/0/0; 0/1/0/;0/0/1 /// </summary> /// <returns>string belonging to the Base</returns> public override string ToString() { return("[" + BaseO.ToString() + ";" + BaseX.ToString() + ";" + BaseY.ToString() + ";" + BaseZ.ToString() + "]"); }