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");
}

Nishant MittalRank #692 · 3.5K reputationPosted Apr 3, 2016, 8:15 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 3, 2016, 9:27 PM EDT
Amit KumarRank #459 · 5.4K reputationPosted Apr 3, 2016, 9:45 PM EDT
Nishant MittalRank #692 · 3.5K reputationPosted Apr 3, 2016, 9:55 PM EDT
Feroz KhanRank #3,748 · 395 reputationPosted Apr 4, 2016, 3:47 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 4, 2016, 8:56 AM EDT
Prakash TripathiRank #72 · 25.3K reputationPosted Apr 6, 2016, 8:42 PM EDT