With the beginning of the dynamic and DLR types in .NET 4, I now have 3 options, declaring what I call "open" types:
var , locally implicit types, to underline the "what" instead of the "how",object , an alias for System.Object anddynamic , disable compiler checks, add methods / properties at runtime
As long as there is a lot written about it, nothing I have found unites them, and I must admit, it is still a bit fuzzy.
Add to that LINQ, lambda expressions, anonymous types, reflection ... and it gets more shaky.
I would like to see some examples of possibly comparable advantages / disadvantages to help me strengthen my understanding of these concepts, as well as help me understand when, where and how I should choose between them.
Thanks!
Gustavo mori
source share