Search code examples
vb.nettextboxequationintegral

VB.Net TextBox Equation Reader


I try to make a program to calculate integrals. I want to read the equation from a textbox and i don't know how to store it. For example i write in the textbox : 3x^2+2x+1. How can i make some arrays to store every member of that equation and to solve it ?


Solution

  • You really should include code if you want people to help you. I have a suggestion but it really all depends. Are you only wanting to put the numbers in an array or all characters and symbols? Or are you wanting to put the entire equation as one entry in the array? I am not sure an array would be the best route to go for this sort of thing. But whatever.

    Public Class Form1
    Dim EqArray() As string
    
    Public Sub Array_Entry()
    Dim NewEntry as string = textbox1.text
    EqArray.items.add(NewEntry)
    msgbox(NewEntry & " has been added.")
    End Sub
    
    End Class