mercredi 25 février 2015

System.FormatException error issues in

I keep getting a system.formatexception error every time I run my program and it keeps highlighting this section with a red underline at the last semicolon. Any idea on why it's doing this and how I can remedy the situation?



output1.Text = "Supplies" + "\n" +
(string.Format("{0,-10} | {1,20} | {2,-23} | {3,40}", "Underlay ", underlay, " panels", underlaycost.ToString("C2"))) + "\n" +
(string.Format("{0,-10} | {1,20} | {2,-23} | {3,40}", "Screws ", screws, " boxes", screwscost.ToString("C2"))) + "\n" +
(string.Format("{0,-10} | {1,20} | {2,-23} | {3,40}", "Adhesive ", gallonsofadhesive, " gallons", adhesivecost.ToString("C2"))) + "\n" +
(string.Format("{0,-10} | {1,20} | {2,-23} | {3,40}", "Grout ", bagsofgrout, " bags", groutcost.ToString("C2"))) + "\n" +
(string.Format("{0,-10} | {1,20} | {2,-23} | {3,40}", "tile " + "Pallets ", pallet, palletcost.ToString("C2"))) + "\n" +
(string.Format("{0,20} | {1,-23} | {2,40}", "Packs ", packs, packcost.ToString("C2"))) + "\n" +
(string.Format("{0,20} | {1,-23} | {2,40}", "Tiles ", tiles, individualtilescost.ToString("C2"))) + "\n" +
(string.Format("{0,20} | {1,-23} | {2,40}", "Thresholds", threshold, thresholdscost.ToString("C2")));

Aucun commentaire:

Enregistrer un commentaire