TiagoReis Posted April 29, 2021 at 01:45 PM Report Share #622138 Posted April 29, 2021 at 01:45 PM Boas a todos, quando eu ponho um dos meus programas a executar aparece este erro, mas eu não o consigo entender. System.FormatException: 'Cadeia de caracteres de entrada com formato incorrecto.' This exception was originally thrown at this call stack: [External Code] WindowsFormsApplication3.Form1.button1_Click_1(object, System.EventArgs) in Form1.cs [External Code] WindowsFormsApplication3.Program.Main() in Program.cs Segue abaixo parte do código. Alguém me pode ajudar, por favor? Cumprimentos, double total = 0; double hst = 0; double totaldue = 0; foreach (ListViewItem item in listView1.Items) { total += Convert.ToDouble(item.SubItems[2].Text); } hst = total * 0.13; totaldue = hst + total; string hstDisplay = hst.ToString("c2"); string totalDisplay = totaldue.ToString("c2"); string amount = total.ToString("c2"); textBox8.Text = amount; textBox9.Text = hstDisplay; textBox10.Text = totalDisplay; tabControl1.SelectTab("tabPage2"); Link to comment Share on other sites More sharing options...
M6 Posted April 29, 2021 at 02:27 PM Report Share #622140 Posted April 29, 2021 at 02:27 PM Sem mais informação - o log de erro deve ter bem mais informação do que o que metes ai - diria que é essa conversão para double que está a dar o problema. 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now