Skip to content

Instantly share code, notes, and snippets.

@y-gagar1n
Created May 27, 2013 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save y-gagar1n/5656772 to your computer and use it in GitHub Desktop.
Save y-gagar1n/5656772 to your computer and use it in GitHub Desktop.
C# - add unknown properties to dynamic object
dynamic expando = new ExpandoObject();
var p = expando as IDictionary<String, object>;
p["A"] = "New val 1";
Console.WriteLine(expando.A);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment