I have populated the follow list with objects of type AnonymousType
List<object> someList = new List<object>();
someList.Add(new { foo = 1 });
My problem is that I can't make it stronly typed to do something like this:
someList.Where(x=> x.foo == 1);
However, it's possible on this list:
var someList = new[] { new { foo = 1 } };
Can I cast my first list to make it behave like the second list? I want to be able to use lambda expressions on the properties like I showed above.