Skip to content

Instantly share code, notes, and snippets.

@DinisCruz
Created May 23, 2012 17:57
Show Gist options
  • Save DinisCruz/2776687 to your computer and use it in GitHub Desktop.
Save DinisCruz/2776687 to your computer and use it in GitHub Desktop.
Trying 4.0 C# ExpandoObject
dynamic expando = new ExpandoObject();
expando.Name = "John";
expando.Speak = new Func<string>(()=> { return "Hi " + expando.Name;});
return expando.Speak();
//using System.Dynamic;
//O2Ref:System.Core.dll
//O2Ref:Microsoft.CSharp.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment