Skip to content

Instantly share code, notes, and snippets.

@jonasraoni
Created June 28, 2021 11:15
Show Gist options
  • Save jonasraoni/283bfff144f502984256234372414547 to your computer and use it in GitHub Desktop.
Save jonasraoni/283bfff144f502984256234372414547 to your computer and use it in GitHub Desktop.
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