|
-
May 10th, 2007, 01:55 PM
#1
Thread Starter
New Member
Convert String to Expression
Suppose I have a textbox called inputfunction and a label called outputfunction. I press a button and this is the code
Dim variable as Object
variable = inputfunction.Text
outputfunction.Text = variable
Ok, If I type in the number 4 in the textbox, I get 4 in the label
What I want is to type in a mathematical expression as a string, and make my "variable" not a string but into a segment of code. Basically I want it so when I type in "2 + 2" it will give me 4 in the label. When I type in sqrt(4) I want it to give me 2 in the label instead of an error message. How do I convert the String into a mathematical expression that visualbasic.net can read as a code insertion?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|