Client
iGame Channel = new ChannelFactory ( new BasicHttpBinding ( BasicHttpSecurityMode . None ) , new EndpointAddress ( new Uri ( \"http://loc
I had this problem because I was calling a method
await myClass.myStaticMethod(myString);
but I was setting myString with
var myString = String.Format({some dynamic-type values})
which resulted in a dynamic
type, not a string
, thus when I tried to await on myClass.myStaticMethod(myString)
, the compiler thought I meant to call myClass.myStaticMethod(dynamic myString)
. This compiled fine because, again, in a dynamic context, it's all good until it blows up at run-time, which is what happened because there is no implementation of the dynamic version of myStaticMethod
, and this error message didn't help whatsoever, and the fact that Intellisense would take me to the correct definition didn't help either.
Tricky!
However, by forcing the result type to string, like:
var myString = String.Format({some dynamic-type values})
to
string myString = String.Format({some dynamic-type values})
my call to myStaticMethod
routed properly