Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove trailing zeros from a decimal value (C#)
var value = 0.1230000000000000M;
Console.WriteLine(value);
Console.WriteLine(value / 1.0000000000000000000000000000M);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment