Ejemplo n.º 1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            //	sb.AppendFormat("{{X={0},Y={1},Z={2}", X, Y, Z);
            sb.AppendFormat("{{Row={0},Column={1},Count={2}", Row, Column, Count);
            if (E != null)
            {
                sb.AppendFormat(",E={0}", E.GetHashCode());
            }
            if (W != null)
            {
                sb.AppendFormat(",W={0}", W.GetHashCode());
            }
            if (N != null)
            {
                sb.AppendFormat(",N={0}", N.GetHashCode());
                if (NE != null)
                {
                    sb.AppendFormat(",NE={0}", NE.GetHashCode());
                }
                if (NW != null)
                {
                    sb.AppendFormat(",NW={0}", NW.GetHashCode());
                }
            }
            if (S != null)
            {
                sb.AppendFormat(",S={0}", S.GetHashCode());
                if (SE != null)
                {
                    sb.AppendFormat(",SE={0}", SE.GetHashCode());
                }
                if (SW != null)
                {
                    sb.AppendFormat(",SW={0}", SW.GetHashCode());
                }
            }
            sb.Append("}");
            return(sb.ToString());
        }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     return(NE.GetHashCode() ^ SW.GetHashCode());
 }