Innanzitutto salve!!!
Quando eseguo il programma, mi appare l' errore scritto sopra. Nel log esce scritto anche"A first chance exception of type 'System.InvalidCastException' occurred in Microsoft.VisualBasic.dll".
Il codice è questo:
Inoltre il compilatore localizza l' errore qui:codice:Public Class Form1 Dim wurtot As Decimal Private Sub WPmeno_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WPmeno.Click wurtot = wurtot - 1 WPrisult.Text = wurtot End Sub Private Sub WPiu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WPiu.Click wurtot = wurtot + 1 WPrisult.Text = wurtot End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click tot.Text = ("Salve, vorrei ") + wurtot + ("Wurstel e patatine") End Sub End Class
Come posso correggere il problema?.codice:"tot.Text = ("Salve, vorrei ") + wurtot + ("Wurstel e patatine")"

Rispondi quotando