How to make simple mathematical operations and displaying the result in a textbox

Posted by Audel on Stack Overflow See other posts from Stack Overflow or by Audel
Published on 2010-04-26T09:54:08Z Indexed on 2010/04/26 10:03 UTC
Read the original article Hit count: 185

Filed under:
|
|

Hi, I know is a rather simple question but I just can't find an appropriate example in google or anywhere.

I've got this piece

int numberOfPlays = int.Parse(textBox2.Text);
numberOfPlays = (numberOfPlays++);
textBox2.Text = (numberOfPlays.ToString()); 
MessageBox.Show(numberOfPlays.ToString());

So basically what I want to do is to get the value of the textBox2, make it an integer and then add 1 to it.

I can't think of any more details right now, so if i'm not clear enough please ask

Thanks in advance

© Stack Overflow or respective owner

Related posts about c#

Related posts about math