I'm working with VB.NET:
I'm looking for a function which gets the number of decimal places for a double value.
I already have a function which does this for values like "0.01", but not for values like "1E-6", but that's what I need.
There is a similar (answered) question on StackOverflow, but doesn't work for scientific notation: Decimal places in a number in VB.NET
Required function:
Input: 0.001 / Output: 3
Input: 0.000001 (.ToString() representation: "1E-6") / Output: 5
Have anyone an elegant way (VB.NET/C#)?