7
Answers

Calculation Issue

Ask a question
Feroz Khan

Feroz Khan

8y
430
1
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)