Console.Write("{0:#.00}", 50);
int k = 10 * 5; Console.WriteLine("Number with two decimals: {0}", k.ToString("F2"));
Console.WriteLine("Number with two decimals: {0:F2}", k);
int a=1; int b=2; decimal x = a * b;
int a = 9; int b = 5; decimal c = checked((decimal)a / b); // X.XX Format Console.WriteLine("{0:F2}", c);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)