![]() |
|
[.NET] Math Operator Question with Reading lines And Writing Lines - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Math Operator Question with Reading lines And Writing Lines (/showthread.php?tid=2331997) |
Math Operator Question with Reading lines And Writing Lines - 192837465 - Mar 23, 2012 I have a question, because i have watched numerous tutorials of thenewboston's JavaScript and VB tuts, but they don't explain a lot about using math operators and things like that with GUI. How would I make it so when someone puts text in one box, then press a button, it runs that text through a math operator, then pops it out into another text box. This is my interpretation of it. (CLICKS BUTTON) TextBox1.readline() TextBox1.(The Text? What would this be)() (Then The Math Operator) (Math Operator OutPut).Writeline() into TextBox2 * - hgdfhsdgdfgdfh - Mar 24, 2012 Code TextBoxResult.Text = (Integer.Parse(TextBoxOperand1.Text) + Integer.Parse(TextBoxOperand2.Text)).ToString()Expressions are parsed in similar fashion as in maths (BEDMAS) and you can use either constant (like: 10, 51.84 etc.) or code operands (TextBox.Text, Integer.Parse(TextBox.Text), Integer.Parse(TextBox.Text)) Examples: Code Dim myIntVariable as Integer = Integer.Parse(textbox.Text) * 10Code Dim average as Double = (Double.Parse(textbox1.Text) + Double.Parse(textbox2.Text)) / 2* - 192837465 - Mar 24, 2012 (Mar 24, 2012 02:11 AM)0xDEADDEAD Wrote: Thank you so much Dead! You're the first person that hasn't flamed on one of my questions about VB! |