C# "dynamic," Part VI

[Update March 31, 2010: MUCH OF THIS HAS CHANGED SINCE PRE-RELEASE VERSION OF DYNAMIC. SEE THIS POST] We left off last time with this piece of codepublic class C { public static void M(int i) { } public static void M(string s) { } } … dynamic d = GetSomeD(); C.M(d); …together with some question…

3

C# "dynamic," Part V

[Update March 31, 2010: MUCH OF THIS HAS CHANGED SINCE PRE-RELEASE VERSION OF DYNAMIC. SEE THIS POST] Let’s look at this:dynamic d = null; object o = d; // not an implicit conversion Last time, I said that the conversion on the second line is not an implicit conversion. If you know C# already, that…

3

C# "dynamic," Part IV

Today, let’s geek out about the language design regarding the dynamic type. Type in the language vs. Type in the runtime One thing that lots of people already know is that when you say “dynamic” in code, you can think of it as “System.Object” in your assembly, because that’s how the compiler emits it.dynamic d…

5