The code samples in C# how to iterate though futures contracts seem to be wrong

 

The referenced example is:

// Save accessor symbol in Initialize() function.
futureSymbol = future.Symbol;

// In OnData(Slice slice)
FuturesChain chain;
// Explore the future contract chain
if (slice.FuturesChains.TryGetValue(futureSymbol, out chain))
{
    var underlying = chain.Underlying;
    var contracts = chain.Contracts.Value; 
    foreach (var contract in contracts)
    {
        //
    }
}

This however fails in the line contracts = chain.Contracts.Value with a compiler error in C#.

What is the correct way to iterate through the contracts ?