private static string size(string s, int l) { if (s.Length > l) { if (l > 3) { s=s.Substring(0, l - 3) + "..."; } else { s=s.Substring(0, l); } } else if (s.Length<l) { while (s.Length < l) { s += " "; } } return s; }