I have a WinForms combobox to which I bind a list of anonymous objects (printer descriptions and locations).
The goal here is a to select a default printer (which matches printer location).
But within a foreach
loop below, I am having trouble accessing the anonymous object's properties.
I know of a work-around (I tried a private nested DTO with Location & Description property)
but is there a way to access anonymous object's properties without creating a concrete class?
Maybe I was just too lazy here...