Skip to content

Instantly share code, notes, and snippets.

@atheken
Created March 13, 2010 02:08
Show Gist options
  • Save atheken/331041 to your computer and use it in GitHub Desktop.
Save atheken/331041 to your computer and use it in GitHub Desktop.
//example expando...
public class ExtensibleClass : IFlyweight
{
private Dictionary<string, object> _props = new Dictionary<String, object>();
public object this[String key]{
get{
return this._props[key];
}
set
{
this._props[key];
}
}
public IEnumerable<ExpandoProperty> AllProperties(){
return this._props.Select(y=>new ExpandoProperty(y.Key, y.Value));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment