TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
gopiraj gopidesi
NA
1
652
hi cheers,,,
Jul 7 2015 9:53 AM
i am getting the error as :Index was out of range. Must be non-negative and less than the size of the collection
while i am trying to run this code.here is my code....
if (data != null)
{
kbs.LoanAmount = amount;
kbs.PaymentFrequency = "Monthly";
kbs.LoanTerm = Convert.ToInt32(terms);
kbs.FirstPaymentDate = data[0].ScheduleDate;
here im getting the error
kbs.Cost1 = 5;
kbs.Cost2 = 1;
for (int i = 0; i < data.Count(); i++)
{
KabbageLoanSchedule kls = new KabbageLoanSchedule();
kls.PaymentNumber = i + 1;
kls.Principal = Math.Round(data[i].PrincipalPaid, 2);
kls.DaysToPayment = data[i].DaysBetweenSchedules;
kls.MinMonthlyCost = Math.Round(data[i].InterestPaid, 2);
kls.MinMonthlyPayment = Math.Round(data[i].ScheduledAmount, 2);
kls.PrincipalRemaining = Math.Round(am - data[i].PrincipalPaid, 2);
kls.PaymentDueDate = data[i].ScheduleDate;
am = kls.PrincipalRemaining;
lkbs.Add(kls);
}
dt.AddMonths(1);
}
Reply
Answers (
1
)
MVC
C# String Replace , to "," for .csv output