I want to subtract a number from my sql server database from a number in a textbox. The number in the textbox is the number the user has typed in.
Below is the code I want to use to subtract the 2 numbers. What do I need to put after the equals sign in order to allow the user to input whatever number they want into the textbox?
private void btnSubtract_Click(object sender, EventArgs e)
{
int answerSubtract;
int numberOne = 6;
answerSubtract = - numberOne;
MessageBox.Show(answerSubtract.ToString());
}
Also does anyone know of a better site than Home and Learn?
This post has been edited by modi123_1: 03 October 2012 - 01:47 PM
Reason for edit:: highlight the lines THEN click the code tags button in the 'format text' box of the post.

New Topic/Question
Reply



MultiQuote










|