Is there a way to iterate (through foreach preferably) over a collection using reflection? I\'m iterating over the properties in an object using reflection, and when the pr
I had this issue, but instead of using reflection, i ended up just checking if it was IEnumerable. All collections implement that.
if (item is IEnumerable) { foreach (object o in (item as IEnumerable)) { } } else { // reflect over item }