using System.Collections.Generic;
public static void Main()
dynamic x = new ExpandoObject();
AddProperty(x, "Language", "English");
Console.WriteLine(x.Language);
public static void AddProperty(ExpandoObject expando, string propertyName, object propertyValue)
var expandoDict = expando as IDictionary<string, object>;
if (expandoDict.ContainsKey(propertyName))
expandoDict[propertyName] = propertyValue;
expandoDict.Add(propertyName, propertyValue);