Today’s Brown Bag Lunch session was “Dynamic and Metaprogramming in .Net 4”, a presentation made to TechEd 2011 in NZ by Ivan Towlson.
Great introduction, very practical, lots of good examples of places you can use the Dynamic Programming features of .Net 4. He begins by talking of the mess that ws, accessing some of the nasty objects when out programming against Office applications, particularly Excel.
He compares alternate ways to .Net 4 dynamic types, including .Net CLR using reflection, COM iDispatch interface and then covers the benefits of dynamic in .Net 4. An example of dynamic types you might use, and not realise now is the MVC Viewbag.
Ivan noted another great use of dynamic is to remove the tedium of creating View Models for WPF applications. See these for some inspiration:
If you’ve been busy in .Net 3.5, and tired of reflection hoopla, or just want to catch up quickly on dynamic in .Net 4 and what it can do for you, this presentation is a good starting point.
Ivan Towlson’s blog: