Example #1
0
        public void DoItB()
        {
            var lines = input.Split('\n');

            var q = from l in lines.SelectMany(l => MoreEnumerable.Index <char>(l.ToCharArray()))
                    group l by l.Key into g
                    select new { g.Key, chr = LeastCommon(g.Select(ab => ab.Value)) };

            var result = new string(q.OrderBy(a => a.Key).Select(b => b.chr).ToArray());
        }
Example #2
0
 public void IndexNullSequenceStartIndex()
 {
     MoreEnumerable.Index <object>(null, 0);
 }
Example #3
0
 public void IndexNullSequence()
 {
     MoreEnumerable.Index <object>(null);
 }
Example #4
0
 public void IndexNullSequenceStartIndex()
 {
     Assert.ThrowsArgumentNullException("source", () =>
                                        MoreEnumerable.Index <object>(null, 0));
 }