In C#, please does anyone know why I can\'t do the following? (specifically the line marked \'NOT fine!\' below)
interface A
{
void Add(dynamic entity);
Looking on Microsoft Connect it's filed as a bug - Dynamic runtime fails to find method from a base interface during runtime
It looks like the multiple layers of interface inheritance are doing in the passing of a dynamic type variable. It's definitely tripping up the run time binding.
At this point if you're looking to get it to work a possible workaround is:
dynamic x = 23;
b.Add((object)x);
dynamic y = "Hello, World!";
b.Add((object)y);
Since dynamic is seen as object by the IL, so casting everything explicitly to type object will get this to work for you.