for example,
70.50 % = 71%
70.20 % = 70 %
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 29, 2013, 9:15 AM
Iftikar HussainPosted Aug 29, 2013, 8:33 AM
Try like this
string data="70.50%";
string tempdata=data.Replace("%","");
double d=Math.Round(Convert.ToDouble(tempdata),2);
string result=d.ToString()+"%";
Regards,
Iftikar