❔ How to force enumaration on ExpandoObj?

Hey guys, i encountered a situation where i have this ExpandoObj
I need to enumerate its properties (so it doesnt deffer execution on some event i have)
Problem is, nothing seems to work.
tried using like aka :
objectlist.Select(x=>{return x}).ToArray()

In addition tried going over the expandoobj with
  foreach (var obj in objectList.OfType<ExpandoObject>())
        {
            var dictionaryView = obj as IDictionary<string, object>;
            foreach (var key in dictionaryView.Keys.ToList()) // .ToList() is crucial to avoid collection modification issues.
            {
                var value = dictionaryView[key];
            }
        }


And still when I hover over the objectList i get a "result view" and "dynamicview" which means it hasnt been enumarated.
Was this page helpful?