C#中的Microsoft.VisualBasic IRR函数 [英] Microsoft.VisualBasic IRR function in C#

查看:322
本文介绍了C#中的Microsoft.VisualBasic IRR函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我吗?

Can someone please help me

double[] values = new double[73];
            for (int j = 1; j == values.Length - 1; j++)
            {
                values[j] = C158_Calc;
            }
            B162_Calc = Financial.IRR(ref values, 0.1);



我收到错误消息参数无效."



I receive an error "Arguments are not valid."

推荐答案

开始编写IRR时,智能感知将向您显示该方法的可用重载.
您那里是否有一个接受您提供的类型的文件(按引用对double和double(大概是double的数组)?
When you start writing IRR, the intellisense should show you the available overloads for that method.

Do you have one there that accepts the types you supply (array of double by reference and double (presumably) ???


IRR的函数定义是(ref double [] ArrayValue,double猜)

我所有的值都是double.
The function definition for IRR is (ref double[] ArrayValue, double guess)

All my values are double.


我想您问题的答案在IRR方法文档[
I suppose the answer to your question is in the IRR method documentation [^]:

ValueArray
类型:System.Double []
必需的.指定现金流量值的Double数组. 数组必须至少包含一个负值(付款)和一个正值(收据).

ValueArray
Type: System.Double[]
Required. Array of Double specifying cash flow values. The array must contain at least one negative value (a payment) and one positive value (a receipt).


:)


这篇关于C#中的Microsoft.VisualBasic IRR函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆