How do I parse a string as if it were code? (Visual Studio)

Let’s have two integer variables: apples and oranges. What I want to do is have the user enter a line of text into a textbox. They will assign values to these variables and enter an equation such as “apples+oranges” into a textbox and the program returns the solution to the equation. What I want to know how to do is to parse the string as if it were its own line of C# code. Any tips?

submitted by /u/MegatenMegabit
[link] [comments]

Leave a Reply