public string DebugPrint(int Indent = 0) { string S, SIndent; SIndent = new string(' ', Indent * 11); S = "Node(Key=" + _Key.ToString() + "; Color=" + (_IsRed ? "red" : "black") + "; Count=" + _Count.ToString() + "; Data=" + _Data.ToString() + "\u000d\u000a"; S += SIndent + " Left ="; if (_Left != null) { S += _Left.DebugPrint(Indent + 1); } else { S += "null"; } S += "\u000d\u000a" + SIndent + " Right="; if (_Right != null) { S += _Right.DebugPrint(Indent + 1) + ")"; } else { S += "null)"; } return(S); }
/// <summary> /// Converts the provided <paramref name="id"/> to its string representation. /// </summary> /// <param name="id">The id to convert.</param> /// <returns>An <see cref="string"/> representation of the provided <paramref name="id"/>.</returns> public virtual string?ConvertIdToString(TKey id) { if (id.Equals(default(TKey))) { return(null); } return(id.ToString()); }
private string KeyToString(TKey key) { if (_keyConverter == null) { return(key.ToString()); } return((string)_keyConverter.Convert(key, typeof(string), null, CultureInfo.CurrentUICulture)); }
internal DictionaryPropertyDescriptor( TKey key, IDictionary <TKey, TValue> valueDictionary, IDictionary <TKey, PropertyAttributes> attributeDictionary = null) : base(key.ToString(), null) { this.valueDictionary = valueDictionary; this.attributeDictionary = attributeDictionary; this.key = key; }
public override string ToString() { return(key.ToString() + "," + value.ToString()); }
public override string ToString() { return(Key.ToString() + " " + Value.ToString()); }
internal string ToString(int count) { return((right != null ? right.ToString(count + 4) : new string(' ', count + 4) + "+ null") + "\n" + new string(' ', count) + (isLeft ? "L" : "R") + " \"" + key.ToString() + "\" : \"" + value.ToString() + "\" (" + balance + " | L" + _depthL + "R" + _depthR + ") \n" + (left != null ? left.ToString(count + 4) : new string(' ', count + 4) + "+ null")); }