I am very new in VB.Net. I can read the integer with no problem at all but I just cannot extract the equation I enter. I enter A+B, I can read it no problem, but how do I extract the equation information to make the two number to add together to show in answer. I try parsing but it is not helping. I got no idea how to do this, need help.
Below is my code:
Public Class Form1
Dim Number1 As Double
Dim Number2 As Double
Dim A As Double
Dim B As Double
Dim Equation As String
Dim Answer As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Number1 = TextBox1.Text
Number2 = TextBox2.Text
Equation = TextBox3.Text
A = Number1
B = Number2
MsgBox(Equation) *can read equation enter
Answer = Equation *can't use the equation
MsgBox(Answer)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
End Sub
End Class