Hello...
I am in my second week of an online Beginning .NET class. We have an assignment that is supposed to simulate a basic payroll-type function. I am getting an error on one of my statements but am unsure why.
At the beginning of the program, I define two constants STATE_TAX and FED_TAX. I define them out as doubles because they are decimals (0.05, 0.15). When I call them out in a statement ( double fedTax = Convert.ToDouble(grossPay) * FED_TAX ) the program stops running and I get an error.
I've attached a screen shot of the message and also a .txt document of the code.
Does anyone know what I'm doing wrong? They are all 'doubles' so I understand how "the input string was not in the correct format"
I am in my second week of an online Beginning .NET class. We have an assignment that is supposed to simulate a basic payroll-type function. I am getting an error on one of my statements but am unsure why.
At the beginning of the program, I define two constants STATE_TAX and FED_TAX. I define them out as doubles because they are decimals (0.05, 0.15). When I call them out in a statement ( double fedTax = Convert.ToDouble(grossPay) * FED_TAX ) the program stops running and I get an error.
I've attached a screen shot of the message and also a .txt document of the code.
Does anyone know what I'm doing wrong? They are all 'doubles' so I understand how "the input string was not in the correct format"