If I have a dynamic parameter the compiler seems to ditch the return type and think it's dynamic.
For example:
public MethodResult IsValid(object userLogin)
{
return new MethodResult();
}
You would think that:
var isValidResult = IsValid(someObject());
Should read as
dynamic -> MethodResult
But it thinks that it is:
dynamic -> dynamic
Does adding a dynamic parameter to the signature completely stop the compiler from knowing what the return should be despite the return being strongly typed?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…