"Purchasing Power Problem Example"

static readonly IDictionary<User, IEnumerable<Purchase>> userPurchases;
 
private static void DoTest() {
    foreach (var kvp in userPurchases) {
        PrintUserDetails(kvp.Key);
        foreach (var purchase in kvp.Value) {
            PrintPurchaseDetails(purchase);
        }
    }
}


Code snippet taken from "Three Garbage Examples".