Having read Jared Parsons blog entry on Switching on Types , I was inspired to follow on with a class that switches on enumerated values. This is achievable using a regular switch, but this approach seems more elegant. The expected usage as follows: // given enumeration public enum HoldingField { Holding, BookValue, MarketValue, EffectiveExposure, } ... // code to extract result from respective property of "h" decimal result = 0m; EnumSwitch.Do ( HoldingField, EnumSwitch.Case(HoldingField...
I discovered this awesome library called NQuery on CodePlex. It allows you to query an object graph using a SQL like syntax. This creates some interesting possibilities for potentially writing the same queries which can work against the database and an object graph when caching is employed. Check it out here . There is also a nice demo application which comes with it so you can test it's capabilities. Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!