Create DTO Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace ROI.DTO
{
public class IRRDTO
{
public double IRRValue { get; set; }
public IRRDTO()
{ }
public IRRDTO(double irrvalue)
{
IRRValue = irrvalue;
}
}
public List<IRRDTO> GetIRR(long id)
{
List<IRRDTO> IRRlilst = new List<IRRDTO>();
List<double> items = new List<double>();
items.Add(-10000);
items.Add(4000);
items.Add(8000);
items.Add(9000);
double[] itemsArray = items.ToArray();
double Guess = 0.5;
double IRRValue = Microsoft.VisualBasic.Financial.IRR(ref itemsArray, Guess);
IRRlilst.Add(new IRRDTO(IRRValue));
return IRRlilst;
}
Enj ..Hope it will help all fincial developers.. ..all the best
No comments:
Post a Comment