December 2008 Entries

C# var - with great power comes great responsibility

There are many heated discussions on the overuse of var and I'm not going to repeat the arguments here. Personally, I have no problem with var used in the declaration of a variable where the value is instantiated inline via a constructor, anything else (apart from LINQ) seems dangerous. Having said that, the following sample I came across today is simply stupid. var controller = new MyController().GetValueX(foo);

Preview Handlers for Vista and Outlook 2007

Really useful for those xml files that people send you. Download the MSDN Magazine Preview Handlers and then setup the xml file with this really cool utility. It gives explorer and outlook preview capabilities for all sorts of file types.