A returning method call is an expression: it can take the place of a value of its declared type. In Zoo, GetPortionSize() returns a double that can be multiplied or compared. Evaluate the call first, then apply the surrounding operator.
double doublePortion =
this.ComoZoo.FeaturedAnimal.GetPortionSize() * 2;The Animal computes its portion from its current fields. MainWindow receives the double and multiplies it by 2. The Animal method itself does not know or store doublePortion. If the Animal state later changes, this local variable keeps its old result until the call runs again.
Do not confuse a method’s return type with the type of the full expression. Here GetPortionSize returns double and multiplying it by the integer literal 2 produces a double result. If you want to display it, convert or format the resulting number for the UI after calculating it. The method call is evaluated each time that expression runs.
Try a returned portion of 0.4 and predict doublePortion. Put a breakpoint on the assignment and inspect the method result, then inspect the final local after the assignment executes.