E
Eric Kiernan
I'm trimmed out some of the extraneous code, but below is the code
snippet. It retains all code structures. Compiler claims that
"variable emptySpending is assigned but never used" But it clearly is,
and the variables declared along with it don't generate a warning.
private bool saveComponentsToGridRow() {
bool emptySpending = true;
bool emptySaving = true;
bool emptyBudget = true;
int i = 0;
if ( tbAccount.Text == "") {
}
for (i = 0; i < 12; i++) {
spendingString = spending.Text;
if (spendingString == "") {
spendingValue = 0;
}
else {
emptySpending = false; // IT IS USED HERE. }
}
snippet. It retains all code structures. Compiler claims that
"variable emptySpending is assigned but never used" But it clearly is,
and the variables declared along with it don't generate a warning.
private bool saveComponentsToGridRow() {
bool emptySpending = true;
bool emptySaving = true;
bool emptyBudget = true;
int i = 0;
if ( tbAccount.Text == "") {
}
for (i = 0; i < 12; i++) {
spendingString = spending.Text;
if (spendingString == "") {
spendingValue = 0;
}
else {
emptySpending = false; // IT IS USED HERE. }
}