round float to two decimal places c# code example
Example 1: c# round to 2 decimal places
decimal b = 1.995555M;
Math.Round(b, 2); //returns 2.00
Example 2: format double to 2 decimal places in c#
priceLbl.Text = price.ToString("0.##");
decimal b = 1.995555M;
Math.Round(b, 2); //returns 2.00
priceLbl.Text = price.ToString("0.##");