For example, if an instance method exampleMethod1has only one parameter, the compiler recognizes that the first method call, ec. exampleMethod1(20, 4)is invalid because it contains two arguments.
The call causes a compiler error. The second method call is dynamic_ec.exampleMethod1(10, 4)not checked by the compiler, because the type dynamic_ecis dynamic. Therefore, no compiler error is reported.
So what is the difference between checking compile time and checking runtime and the advantage of using a dynamic type?
source
share