If it possible:
IList <dynamic> = new List <dynamic>;
or:
class A <T>
{
A(T){}
}
class B: A <dynamic> {}
. Why it is not possible to do this:
class U: IEnumerable <dynamic> {}
?
If it possible:
or:
. Why it is not possible to do this:
? |
||||
|
This is not allowed, as Chris Burrows (who helped create and implement
|
||||
|
The easiest way of thinking about it - dynamic is not a type. dynamic is a compiler directive which turns off all compile-time checks, and implements them at runtime instead. When you declare a variable dynamic:
actually you are declaring the variable as System.Object, then turning off all compile-time checks for expressions which involve that variable:
You cannot use |
|||
|