public static void LogTop(string table, QList <string> list, int ct) { Log("top " + table); int i = 0; foreach (string t in list.Each()) { Log(" " + t + " " + list.GetPosition(t)); i++; if (i >= ct) { break; } } }