You can try any of the following ways:
inputValue = Math.Round(inputValue, 2);
decimalVar.ToString ("#.##");
ToString("0.00"); //2dp Number
ToString("n2"); // 2dp Number
ToString("c2"); // 2dp currency
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
No comments:
Post a Comment