What does “Use of unassigned local variable” mean? [duplicate]
The compiler isn’t smart enough to know that at least one of your if blocks will be executed. Therefore, it doesn’t see that variables like annualRate will be assigned no matter what. Here’s how you can make the compiler understand: if (creditPlan == “0”) { // … } else if (creditPlan == “1”) { // … Read more