it's telling me my "else if" is an "invalid expression term" and I am not sure what I'm doing wrong. I'm stumped
EDIT: I figured it out!!! Fix is below...now on to the rest!
EDIT2: nevermind, tons of errors...going to bed now. Tomorrows another day...hopefully a better one
private void disPercent()
{
char cutomerType = char.Parse(typeBox.Text);
double subTotal = double.Parse(subBox.Text);
double dscntAmnt = (subTotal * percntOff);
double totalAmnt = (subTotal - dscntAmnt);
double percntOff;
if (cutomerType == "R") & (subTotal >= 250);
percntOff = .25;
else if (cutomerType == "C") & (subTotal < 250);
percntOff = .20;
else (cutomerType != "C") & (cutomerType != "R");
percntOff = .4;
percentBox.Text = percntOff.ToString();
}
private void disPercent()
{
char cutomerType = char.Parse(typeBox.Text);
double subTotal = double.Parse(subBox.Text);
double percntOff;
if (cutomerType == "R")
{
(subTotal >= 250);
percntOff = .25;
}
else if (cutomerType == "C")
{
(subTotal < 250);
percntOff = .20;
}
else (cutomerType != "C") & (cutomerType != "R");
percntOff = .4;
percentBox.Text = percntOff.ToString();
}
This post has been edited by cdh: 26 January 2010 - 11:26 PM

New Topic/Question
Reply



MultiQuote




|