September 2019
Intermediate to advanced
816 pages
18h 47m
English
In the previous section, Using var with primitive types, we saw that combining var with implicit type casting can cause real problems. But in certain scenarios, this combination can be advantageous and sustain the code's maintainability.
Let's consider the following scenario—we need to write a method that sits between two existing methods of an external API named ShoppingAddicted (by extrapolation, these methods can be two web services, endpoints, and so on). One method is dedicated to returning the best price for a given shopping cart. Basically, this method takes a bunch of products and queries different online stores to fetch the best price.
The resulting price ...
Read now
Unlock full access