Click here to Skip to main content
15,904,497 members

Comments by Adelebeth (Top 9 by date)

Adelebeth 21-Feb-14 18:37pm View    
After sleeping and going to work, THEN looking at it, I figured it out! I just had to erase it and start fresh. Thank you!!!!
Adelebeth 21-Feb-14 1:01am View    
Hmm ok thank you. I will keep trying I think I need to go to sleep and look at it tomorrow with fresh eyes and less frustration. Will update again then. I appreciate your help!
Adelebeth 21-Feb-14 0:34am View    
I'm sorry if this is "messy" I am still learning.

I just tried this:

decimal calc5YrTotal1 = Convert.ToInt32(label5YearTotalCostAnswerCar1.Text);
decimal calc5YrTotal2 = Convert.ToInt32(label5YearTotalCostAnswerCar2.Text);
if (calc1YearGasCar1 < calc1YearGasCar2)
label5YearTotalCostAnswerCar1.BackColor = Color.Green;
else
label5YearTotalCostAnswerCar2.BackColor = Color.Green;

I got this error:

An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll

Additional information: Input string was not in a correct format.

I am so deflated.. and tired.. Thank you for trying to help, I'm just stuck..
Adelebeth 21-Feb-14 0:24am View    
I figured out WHAT I can't figure out HOW. I need the value created by

calc5YearCostCar1 = (userEnteredPurchasePriceCar1 + (calc1YearGasCar1 * 5) + (userEnteredInsuranceCar1 * 5) + (userEnteredRepairCar1 * 5));

to be compared to the value of

calc5YearCostCar2 = (userEnteredPurchasePriceCar2 + (calc1YearGasCar2 * 5) + (userEnteredInsuranceCar2 * 5) + (userEnteredRepairCar2 * 5));

so, I was using calc5YearCostCar1 and 2 twice.

What I am having a hard time figuring out, is how do I rename the value I get from

calc5YearCostCar1

to use it in my "if" statement?
Adelebeth 21-Feb-14 0:16am View    
I have been staring at the same code errors for 4 hours now. I think my brain has died. At this point, I have tried for a long time, and I have just changed things and created different errors. I have only been in this class for a couple weeks now, and I think I created something too complex for what I currently know.