Showing posts with label Length of decimal points in C#. Show all posts
Showing posts with label Length of decimal points in C#. Show all posts

count of digits after decimal points

Here we have an example to find out the number of digits that come after decimal points.

string number = "253.1258";
int length = number.Substring(number.IndexOf(".")+1).Length;