anjali khanRank #4,788 · 325 reputationPosted Jan 28, 2016, 8:28 PM EST
+1
hi Ranjit
thanks for the update as on time
but now i m getting error like
Error 2 ) expected
Error 4 ; expected
Error 5 ; expected
Error 7 ; expected
Error 8 ; expected
Error 10 ; expected
Error 6 Invalid expression term ')'
Error 1 Invalid expression term ','
Error 9 Invalid expression term 'else'
Error 3 Invalid expression term 'out'
+1
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 9:24 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Feb 2, 2016, 9:50 PM EST
if(int.tryParse(textBox1.Text, out value))
{
value=Convert.ToInt32(textBox1.Text);
}
else
{
value=0;
}
value--;
if(value==0)
value=0;
textBox1.Text=value.ToString();
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 3:28 AM EST
In increment button click event
int value=Convert.ToInt32(textBox1.Text);
value++;
textBox1.Text=value.ToString();
For decrement
int value=Convert.ToInt32(textBox1.Text);
value--;
textBox1.Text=value.ToString();
If it helps you select it as correct answer.
anjali khanRank #4,788 · 325 reputationPosted Jan 28, 2016, 6:14 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 6:40 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 7:03 PM EST
value=Convert.ToInt32(textBox1.Text);
value++;
textBox1.Text=value.ToString();
For decrement
value=Convert.ToInt32(textBox1.Text);
value--;
textBox1.Text=value.ToString();
If it helps you select it as correct answer.
anjali khanRank #4,788 · 325 reputationPosted Jan 28, 2016, 7:33 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 7:45 PM EST
value=Convert.ToInt32(textBox1.Text);
value++;
textBox1.Text=value.ToString();
For decrement
value=Convert.ToInt32(textBox1.Text);
value--;
textBox1.Text=value.ToString();
anjali khanRank #4,788 · 325 reputationPosted Jan 28, 2016, 8:28 PM EST
Ranjit PowarRank #553 · 4.4K reputationPosted Jan 28, 2016, 9:24 PM EST
value=Convert.ToInt32(textBox1.Text);
value++;
textBox1.Text=value.ToString();
For decrement
value=Convert.ToInt32(textBox1.Text);
value--;
textBox1.Text=value.ToString();
anjali khanRank #4,788 · 325 reputationPosted Jan 29, 2016, 12:51 AM EST
anjali khanRank #4,788 · 325 reputationPosted Feb 2, 2016, 9:47 PM EST
anjali khanRank #4,788 · 325 reputationPosted Feb 2, 2016, 10:47 PM EST
anjali khanRank #4,788 · 325 reputationPosted Feb 2, 2016, 10:55 PM EST
Natasha Asyikin9 reputationPosted May 25, 2022, 12:21 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts