Okay so i'm running through some tutorials, and the guy goes on to explain how to do a very basic calculator.
So he goes though how to do it all and i end up with this:
int firstTextBox = 0;
int secondTextBox = 0;
int result = 0;
firstTextBox = int.Parse (textBox1.Text);
secondTextBox = int.Parse (textBox2.Text);
result = firstTextBox + secondTextBox;
label1.Text = result.ToString();
It works, but i'm just wondering that howcome no matter what i change the:
int firstTextBox = 0;
int secondTextBox = 0;
int result = 0;
0 numbers to it still works, even if i do this:
int firstTextBox = 7;
int secondTextBox =12;
int result = 4;
It will still work properly as a calculator, so i guess what im asking out of curiosity is what do them three 0's actually represent ?
So he goes though how to do it all and i end up with this:
int firstTextBox = 0;
int secondTextBox = 0;
int result = 0;
firstTextBox = int.Parse (textBox1.Text);
secondTextBox = int.Parse (textBox2.Text);
result = firstTextBox + secondTextBox;
label1.Text = result.ToString();
It works, but i'm just wondering that howcome no matter what i change the:
int firstTextBox = 0;
int secondTextBox = 0;
int result = 0;
0 numbers to it still works, even if i do this:
int firstTextBox = 7;
int secondTextBox =12;
int result = 4;
It will still work properly as a calculator, so i guess what im asking out of curiosity is what do them three 0's actually represent ?