SyntaxHighlighter Build Test Page
Thoughts from a C# Developer

Archives / 2008 / October

  • Dynamic Typing in C# 4.0

    Monday, October 27, 2008
    I'm here at PDC 08 and attended a great session by Anders Hejlsberg for some of the things coming down the pipe for C# 4.0. One of the more exciting offerings is the idea of resolving names in your code at runtime instead of compile time via dynamic lookup. There is a new static Type called dynamic which it's usage pattern is such: dynamic calc = new Calculator (); int sum = calc.Add(10, 20); In addition, it can be used in as a argument modifier for methods: void RunCalculator(dynamic calc, int num1, int num2) { calc.Add(num1, num2); } This is
    Filed under | 0 comments »