Code sample below shows how to implement a dynamic function call. Actually we need that kind of dynamic function call rarely instead of static call. However it helped me a lot in a complicated scenario. Less code , less effort and a clean code...
Also you can check standard documentation in here .