Feroz Khan

Feroz Khan

  • 1.4k
  • 300
  • 92.3k

Calculation Issue

Apr 3 2016 4:37 PM
HI, 
 
I want to calculate value like below but some decimal value is not rounding like for example if
decimal value more than 0.50 than should be 1. please below my code and tell me solution. thanks.
 
if (Perc >= 95 && Perc <= 99)
{
bounus_txt.ForeColor = Color.Green;
bounus_txt.Text = (TotalSale / 100 * 0.50).ToString("0");
}
 

Answers (7)