C# .NET - to find Financial Rate in c# - Asked By anbu n on 03-Jan-12 11:20 AM

i've used Microsoft.VisualBasic.Financial class to find Rate

here is the below code i've used,

lblEffcost.Text = (((Financial.Rate(_RATE_Param1, _RATE_Param2, _RATE_Param3, _RATE_Param4, 0, 0)) * 12) * 100).ToString();

here in above for some parameter the Rate method is working fine, for some other parameters its showing an exception error as  "Cannot calculate rate using the arguments provided"

but for those parameters are working in Excel sheet
----
Some how i need to find Rate as like excel....
can some one give idea or any other free dll or api or apk to get Rate
[)ia6l0 iii replied to anbu n on 03-Jan-12 12:05 PM
This is new to me. Did some surfing to find the difference. And below is what I found.

Both Excel and the VisualBasic financial functions seem to have limitations. 

Excel does 20 iterations after which it returns the #Num! error.
http://ezinearticles.com/?Calculating-Interest-Rates-with-Microsoft-Excel&id=868487

Visual Basic throws this exception after 40 iterations.
http://bytes.com/topic/visual-basic-net/answers/473500-financial-rate-cannot-calculate-rate-using-arguments-provided
anbu n replied to [)ia6l0 iii on 03-Jan-12 12:08 PM
ok.. .is there any other way to work it out...