ToString() public method

Builds a more friendly representation of this object.
public ToString ( ) : string
return string
Exemplo n.º 1
0
        /// <summary>
        /// More readable representation of the object.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("<");
            builder.Append(_field.ToString());
            builder.Append(" => ");
            builder.Append("[");
            for (int i = 0; i < _positions.Length; ++i)
            {
                builder.Append(_positions[i]);
                builder.Append(", ");
            }
            builder.Append("]");
            return(builder.ToString());
        }