Compile time type vs runtime type of a variable

Let’s consider this code for a moment: 1: public abstract class Animal { } 2:   3: public class Tiger : Animal { } 4:   5: public class Elephant : Animal { } 6:   7: public class MyClass 8: { 9: public static void Main() 10: { 11: Animal a = new Tiger();…

2

How-To: Dynamic without dynamic

I am sure that by now you all heard about the new C# 4.0 feature called dynamic. In short, dynamic is the new feature in C# 4.0 that allows you to defer member binding until runtime. The way you use this feature is very straight forward. If you have a class C with a method…

0

C# 4.0 – Dynamic internals talk

Yesterday I gave a talk to the Redmond .NET user group where I talked about the C# 4.0 dynamic feature. The talk focused on how the feature is implemented and how all the pieces go together. About 30 people showed up and stayed for the 1 hour and 40 minutes of dynamic talk. According to…

0