1

I have a very simple question, I see advance level programmers do not store values in any variable before returning. They simply use the return statement.

public static decimal GetChargesF(int selectedUnitType, int insuranceTypeId)
{
        return GetMoveIn(selectedUnitType, insuranceTypeId);
}

Now my question is, how does it help during debugging. If I had one variable to store the return value before actually returning then I would have debugged much faster. As of now the only way for me is to go to the calling function and see the values returned. Is this expected or there is some way to know the values without storing in any variable. Is there any way to put the breakpoint on the return statement and see the values.

Unbreakable
  • 7,776
  • 24
  • 90
  • 171

0 Answers0