If you want to round the decimal value to 2 decimal places , one can simply use the .ToString method by providing the format specifiers as shown below.
How to Round the Decimal Value to 2 Decimal Places in C# ?
using System; namespace AbundantCode { internal class Program { private static void Main(string[] args) { Decimal value = 876543.58900M; Console.WriteLine(value.ToString("#.##")); Console.ReadLine(); } } }
Leave a Reply