Search content within the blog

Monday, December 29, 2008

Rounding of decimal values

decimal ShippingCharge = 0.0m;
ShippingCharge = decimal.Round(decimal.Parse(dr["TotalShippingcharge"].ToString()), 2);
//here 2 stands for number of decimal places
lblShipping.Text = ShippingCharge.ToString();

No comments:

Post a Comment