对不起,我只需要一套额外的眼睛,我第二次猜测自己。我正在从经典的vb6翻译到C#,并且我已经在运算符优先级上查询了表格,但是我仍然没有正确地工作。我翻译得对吗?
VB6
= _
m_curAmountInvested * (1 + m_dblInterestRate/12)^m_intMonthsToAttain + _
m_curAddDeposits * ((1 + m_dblInterestRate/12)^m_intMonthsToAttain - 1)/(m_dblInterestRate/12)
C#
= (currentAmountSaved * Math.Pow((1d + interestRate)/12d, numberOfMonths)) +
((monthlySavingsAmount * (Math.Pow((1d + interestRate)/12d, numberOfMonths) - 1d))/(interestRate/12d))
ahhhh那会是问题!非常感谢,它是漫长的一天。 – Dave 2009-10-09 22:48:15