Esempio n. 1
0
        void BeginCalculate()
        {
            double monthlyPayment;

            this.calculatedPayments       = LoanPayment.Calculate((double)LoanAmount, (double)(InterestRate / 12M), (double)(TermOfLoan * 12), StartMonth, out monthlyPayment);
            this.calculatedMonthlyPayment = (decimal)monthlyPayment;
            this.calculatedYearPayments   = YearPayment.Calculate(this.calculatedPayments);
        }
            public YearPayment YearAmounts(int year)
            {
                foreach (YearPayment i in yearPayments)
                {
                    if (i.year == year)
                    {
                        return(i);
                    }
                }
                YearPayment y = new YearPayment(year);

                yearPayments.Add(y);
                return(y); //creates it if it does not exist
            }