This project is read-only.

foreach with a single item

Dec 10, 2012 at 8:38 PM

When iterating an expando object with a Razor foreach, I receive the "'System.Collections.Generic.KeyValuePair<string,object>' does not contain a definition for ..." error.  This only happens when there is a single object in the array.  As soon as there is more than object in the array, it works.

Is there a workaround for this?

Thank you advance.