.NET: Decimal to rounded string

.net, c#, math, rounding

Solution

Don't use the curly brackets, they are for embedding a formatted value in a longer string using `string.Format`. Use this:

myDecimal.ToString("0.00");

Problem

If I have a `decimal`, how do I get a string version of it with two decimal places? This isn't working: ``` Math.Round(myDecimal, 2).ToString("{0.00}"); ```

Original source