Is there a display formatter that will output decimals as these string representations in c# without doing any rounding?
// decimal -> string 20 -> 20
I don't think it's possible out-of-the-box but a simple method like this should do it
public static string TrimDecimal(decimal value) { string result = value.ToString(System.Globalization.CultureInfo.InvariantCulture); if (result.IndexOf('.') == -1) return result; return result.TrimEnd('0', '.'); }