How Convert String to integer- vb.netHi,
please I need your help.
I want to convert a string that is in textBox1.text, which is= "1+2+3" into integer value given result 6.
I tried to convert it to integer but what actually happened is that it's only taking the first value, which is 1 and convert it to integer.
can you please help me?
Private Sub Sum_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Sum.Click
TextBox1.Text = TextBox1.Text & "+"
Answer = Val(TextBox1.Text)
Answer += Val(TextBox1.Text)
FinalResult = Answer