public static void Dumpl(IEnumerable c) {
Write("{");
int nlines = 0;
StringBuilder sb = new StringBuilder();
foreach(object o in c) {
string s;
if (o != null) {
s = o.ToString();
if (o is string) s = "\""+s+"\""; else
if (o is char) s = "\'"+s+"\'";
} else
s = "<null>";
if (sb.Length + s.Length < screenWidth) {
sb.Append(s);
sb.Append(',');
} else {
Write(sb.ToString());
Write("\n");
sb = new StringBuilder();
if (nlines++ > maxLines) {
sb.Append(".....");
break;
}
}
}
Write(sb.ToString() + "}\n");
}