The dynamic
keyword in C# 4 introduces new ways to work with objects that weren't previously possible. How does this overlap with generics? Specifically, are there operations that would be potentially useful which are now legal and valid?
For example, this isn't possible now:
// Use a type whose value is known only at runtime.
Type t = ...;
List<t> l = new List<t>();
// ... (add some items to the list)
t first = l[0];
Is there a way to accomplish something similar once dynamic
is available?