Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#dynamic and ExpandoObjectSingle-choice MCQ

What happens when you add a member to an `ExpandoObject` and then enumerate it as `IDictionary<string, object>`?

dynamic e = new ExpandoObject(); e.Name = "Ada"; e.Age = 36; var dict = (IDictionary<string, object>)e; Console.WriteLine(dict.Count); dict.Remove("Age"); Console.WriteLine(((dynamic)e).Age);