C# 4.0 dynamic and Dynamic Language Runtime presentation at LA Code Camp

I did a two session presentation at LA Code Camp today to talk about the C# 4.0 dynamic feature and the dynamic language runtime. The presentation materials could be downloaded here.

The zip file contains the source code of several demos that I did today:

  1. DynamicTest: A simple C# dynamic example.
  2. BoxUnbox: Example demonstrates the boxing/unboxing behavior of C# dynamic variables.
  3. PrivateMember: Example demonstrate that code in full-trust can access private member but it will throw exception when running in partial-trust. A partial-trust sandbox is used to simulate the partial-trust environment in the demo.
  4. MultipleDispatch: This example was from Curt Hagenlocher’s blog.
  5. MOR: This example demonstrates accessing unknown type or dynamic object using dynamic variable. The MOR means minimalist OR Mapper; it converts query results in anonymous types dynamically.
  6. TypeModel: This demo shows how to access static members of a unknown type using dynamic variable. The unknow type is wrapper in the TypeModel object which implements IDynamicMetaObjectProvider interface. The TypeModel class is extracted out of the DLR Symbl example.
  7. DLRTreeTest: This example demonstrate factorial function implemented using System.Linq.Expression (Microsoft.Script.AST in .NET 3.5 version of DLR).

No Comments