Last post Sep 19, 2008 05:33 AM by smlemmon
Apr 14, 2008 04:19 PM|smlemmon|LINK
Apr 16, 2008 06:19 AM|Bruno Yu - MSFT|LINK
Based on your post, the first parameter of Financial.IRR method can only work at design time, just like the example code provided in MSDN document. I would like to provide you two points of view from the document of this method:
1. The first parameter "ValueArray" is the array of Double specifying cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).
2. The IRR function uses the order of values within the array to interpret the order of payments and receipts. Be sure to enter your payment and receipt values in the correct sequence. The cash flow for each period does not need
to be fixed, as it is for an annuity.
In my opinion, yo have to make sure the added irrArrayList member in your for loop is in the correct form. Moreover, you can also consider to initialize the first member of the array, then add the other members by your original code.
Hope that helps.
Sep 19, 2008 05:06 AM|mailtodivas|LINK
There is no such thing like "Microsoft.VisualBasic.Financial.IRR(ref irrArray, estimate)"
. After Microsoft.VisualBasic there is no Financial class exist, there is VBCodeProvider class in Microsoft.VisualBasic namespace.
So please give me direction to get IRR function in ASP.NET 2.0 with C# language.
Thans & Regards
Sep 19, 2008 05:33 AM|smlemmon|LINK
You will need to make sure that you add the "Microsoft.VisualBasic" assembly to the references in your project to be able to access the "Microsoft.VisualBasic.Financial.IRR" method.