Using reflection I have an object which I need to cast into an iterable list of items (type unknown, will be object). Using the Watch window I can see my object is an array
Try this:
var myList = anArray as IEnumerable; if (mylist != null) { foreach (var element in myList) { // etc } }
You might also need to specify the generic type of the IEnumerable, depending on your situation.