How do you round a number to two decimal places in C#?

How do you round a number to two decimal places in C#?

 

 

How do you round a number to two decimal places in C#?

Code here..

string a = "10.65678";

decimal d = Math.Round(Convert.ToDouble(a.ToString()),2)

 

Post a Comment

0 Comments

Translate

Close Menu