C# LINQ - sort and group a Dictionary<string,DateTime> by date with maximum group size -
i looking created batches dictionary<string, datetime> following constraints: all items in batch share same date there can no more x items in single batch. if there more items same date, batch must created. i have worked out following logic, wondering if there other more succinct way of doing linq. using system; using system.collections.generic; using system.linq; using system.text; namespace dictionary_sort_by_value_test { class program { static void main(string[] args) { int maxbatchsize = 3; dictionary<string, datetime> secs = new dictionary<string, datetime>(); secs.add("6571 jt", new datetime(2011, 1, 10)); secs.add("6572 jt", new datetime(2011, 1, 12)); secs.add("6573 jt", new datetime(2011, 1, 12)); secs.add("6574 jt", new datetime(2011, 1, 12)); secs.add("6575 jt", new datetime(2011, 1, 10...