c# - What did I do wrong here? The only error I get is near the bottom. Use of unassigned local variable 'parts' right after "add tax" -
private decimal taxcharges() { decimal addtax; decimal parts; addtax = parts * 0.06m; taxtxtbx.text = addtax.tostring("c"); return addtax; }
unassigned local variable 'parts' right after "addtax = parts
the variable parts
has never been assigned value.
assign value before making use of variable. example:
decimal parts = 0;
Comments
Post a Comment