Ok, I give up. It's probably something really simple I'm missing but I've been stuck on this for the last 2 hours and I can't find the answer anywhere online. The below code shows a CS1579 error in my `list` inside my `foreach` saying that:

> 
> "foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public definition for 'GetEnumerator'".
> 
> 
> 

Shouldn't my `roomList[roomNameTest]` return a `List<string>`?

```
var roomList = new OrderedDictionary();

var listA = new List<string>();
listA.Add("elemA");
listA.Add("elemB");

roomList["roomA"] = listA;

var roomNameTest = "roomA";

if (roomList.Contains(roomNameTest))
{
    var list = roomList[roomNameTest];

    foreach (var item in list)
    {
        Console.WriteLine(item);
    }
}

```

**SOLUTION:**

Using a `Dictionary<string, List<string>>()` worked really well and I used the `OrderBy(x => x.Key)` to sort the dictionary later on as I needed. Thanks everybody for the contribution, much appreciated.