private static void DoTestB() { foreach (var kvp in userPurchasesB) { PrintUserDetails(kvp.Key); foreach (var purchase in (List<Purchase>) kvp.Value) { PrintPurchaseDetails(purchase); } } }