I have this function
string F(dynamic a)
{
return "Hello World!";
}
later when i say
dynamic a = 5;
var result = F(a);
result must be in compilation time a string type, but that not happened, why? In fact, the compilar pass this
int result2 = F(a);
and not this
int result3 = F(5);
Anything help please?
F
? – Chris Nov 6 '14 at 13:53result
is dynamic too – Jonesopolis Nov 6 '14 at 13:54dynamic stops the compiler from knowing the type on any parameters, properties, or method return types
– Jonesopolis Nov 6 '14 at 13:57