December 2009 Entries

More On The Death of If-Else

Aaron Feng posted recently on “The death of if-else, if, and else”. In the post Aaron rewrote some JavaScript conditional checks using a dispatch table type approach. Following along with Aaron’s post using C#, we’d start with a list of Channel objects: var channels = new List<Channel> { new Channel { Number = 2, Station = "NBC", ShowTitle = "Saturday...

Your Abomination Is My Clever Hack

In the MvcContrib project there is an HTML helper for putting data into a <table>. The syntax looks like this: <%= Html.Grid(item.Addresses) .Columns(column => { column.For(a => a.City); column.For(a => a.Country); ...