Dynamic in C# 4.0: Introducing the ExpandoObject
Posted by: C# Frequently Asked Questions,
on 30 Sep 2009 |
View original | Bookmarked: 0 time(s)
You have probably already heard about the new dynamic feature in C# 4.0 and how it is used to support COM interop. If you haven't, I strongly recommend reading the following MSDN articles: Using Type dynamic and How to: Access Office Interop Objects by Using Visual C# 2010 Features. Well, where else can you use this new feature? What are the use cases? Where does dynamic dispatch work better than static typing? The quick answer is that whenever you see syntax like myobject.GetProperty("Address"),...