- Jan 13, 2012
- 2,380
- 0
- 0
Hi!
I?m pretty new to developing apps and i wonder why this code doesn?t work?
int dataUsed = int.Parse(dataPerMonthTextBox.Text) - int.Parse(dataLeftTextBox.Text);
int procentUsed = dataUsed / int.Parse(dataPerMonthTextBox.Text);
procentUsedTextBlock.Text = "Procent used: " + procentUsed;
In the textblock i get "Procent used: 0" no matter wath i write in the textblocks and when i debug the application i se that the both the integers are 0.
I?m pretty new to developing apps and i wonder why this code doesn?t work?
int dataUsed = int.Parse(dataPerMonthTextBox.Text) - int.Parse(dataLeftTextBox.Text);
int procentUsed = dataUsed / int.Parse(dataPerMonthTextBox.Text);
procentUsedTextBlock.Text = "Procent used: " + procentUsed;
In the textblock i get "Procent used: 0" no matter wath i write in the textblocks and when i debug the application i se that the both the integers are 0.