System.Runtime.Serialization.Plists.BinaryPlistDictionary.ToString C# (CSharp) Method

ToString() public method

Returns the string representation of this instance.
public ToString ( ) : string
return string
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("{");
            int keyRef, objectRef;

            for (int i = 0; i < this.KeyReference.Count; i++)
            {
                if (i > 0)
                {
                    sb.Append(",");
                }

                keyRef = this.KeyReference[i];
                objectRef = this.ObjectReference[i];

                if (keyRef < 0 || keyRef >= this.ObjectTable.Count)
                {
                    sb.Append("#" + keyRef);
                }
                else if (this.ObjectTable[keyRef] != null && this.ObjectTable[keyRef].Value == this)
                {
                    sb.Append("*" + keyRef);
                }
                else
                {
                    sb.Append(this.ObjectTable[keyRef]);
                }

                sb.Append(":");

                if (objectRef < 0 || objectRef >= this.ObjectTable.Count)
                {
                    sb.Append("#" + objectRef);
                }
                else if (this.ObjectTable[objectRef] != null && this.ObjectTable[objectRef].Value == this)
                {
                    sb.Append("*" + objectRef);
                }
                else
                {
                    sb.Append(this.ObjectTable[objectRef]);
                }
            }

            return sb.ToString() + "}";
        }