C# Linq to CSV Dynamic Object runtime column name
问题 I'm new to using Dynamic Objects in C#. I am reading a CSV file very similarly to the code found here: http://my.safaribooksonline.com/book/programming/csharp/9780321637208/csharp-4dot0-features/ch08lev1sec3 I can reference the data I need with a static name, however I can not find the correct syntax to reference using a dynamic name at run time. For example I have: var records = from r in myDynamicClass.Records select r; foreach(dynamic rec in records) { Console.WriteLine(rec.SomeColumn); }