double a = 23.22; string msg = string.Format("E format: {0:N4}", a); MessageBox.Show(msg);
Use Math.Round(Decimal, Integer) sample: Math.Round(23.22, 4) result: 23.2200
decimal.Round((decimal)23.12003, 4) - 23.1200 decimal.Round((decimal)23.120, 4) - 23.12
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)