User-1901014284 posted
Hi,
I have the below code to calculate a division on 2 textboxes based in their int values. the code runs with no issues but returns a result with 0. (for example the final result displays as 0.12 whereas I would like the result to be displayed as 12.
double conhrs, HrsPerYear;
double.TryParse(ContractAnnualHoursTextBox.Text, out conhrs);
double.TryParse(HoursperYearLabel.Text, out HrsPerYear);
double Perc = (double)conhrs / HrsPerYear;
//if (Perc > 0)
TotalPercentageLabel.Text = Perc.ToString("c").Remove(0, 1);
Any help would be greatly appreciated.
Jonny