java: public String toString() {final StringBuilder sb = new StringBuilder("[");for (Object item : this) {if (sb.length()>1) sb.append(", ");if (item instanceof char[]) {sb.append((char[]) item);} else {sb.append(item);}}return sb.append(']').toString();}
C#: public override string ToString(){var sb = new StringBuilder("[");foreach (var item in this){if (sb.Length > 1){sb.Append(", ");}sb.Append(item);}return sb.Append(']').ToString();}