Here is the exception:
“Input string was not in a correct format.”
Here is the line of code:
.Add(Integer.Parse(LoanData.Item("IsApplicantRaceAmericanIndian")).ToString)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The text you’re trying to parse must not represent a valid integer. For example it might be “ABC” or it might be blank.
Use
Integer.TryParseinstead ofInteger.Parsefor a more resilient parsing strategy: