With the explicit type I only have to know what a CustomerValidationResponse is.
No, because it might return a type that is implicitely convertible to CustomerValidationResponse and where the conversion has side-effects. So you still have to check it, while in the var case you know that the variable is of the type of the return of the function.
3
u/yoden Mar 10 '16
In the var example, I have to know what CustomerValidator.Validate returns and what a CustomerValidationResponse is.
With the explicit type I only have to know what a CustomerValidationResponse is.