private static bool GetReviews() { var reviews = ComicAnalyzer.GetReviews(Comic.Catalog, Comic.Reviews); foreach (var review in reviews) { Console.WriteLine(review); } return(false); }
private static bool GroupComicsByPrice() { var groups = ComicAnalyzer.GroupComicsByPrice(Comic.Catalog, Comic.Prices); foreach (var group in groups) { Console.WriteLine($"{group.Key} comics:"); foreach (var comic in group) { Console.WriteLine($"#{comic.Issue} {comic.Name}: {Comic.Prices[comic.Issue]:c}"); } } return(false); }
private static bool GroupComicsByPrice() { //The outer foreach loop prints info about each group, //the inner foreach enumerates the group. var groups = ComicAnalyzer.GroupComicsByPrice(Comic.Catalog, Comic.Prices); foreach (var group in groups) { Console.WriteLine($"{group.Key} comics:"); foreach (var comic in group) { Console.WriteLine($"#{comic.Issue} {comic.Name}: {Comic.Prices[comic.Issue]:c}"); } } return(false); }
private static bool GroupComicsByPrice() { var groups = ComicAnalyzer.GroupComicsByPrice(Comic.Catalog, Comic.Prices); }