private static void ReportByModule(List<DumpData> dumpsData) { var moduleCount = from d in dumpsData where d.FrameOfInterest != null group d by d.FrameOfInterest.ModuleName into module let count = module.Count() orderby count descending select new { Module = module.Key, Count = count }; using (var tp = new TablePrinter(50, "Module Name", "#Problems")) { foreach (var mc in moduleCount) { tp.WriteRow(new object[] { mc.Module, mc.Count }); } tp.WriteRow(new object[] { "--Unexpected--", dumpsData.Count(d => d.FrameOfInterest == null) }); } }