Something like these:
1234.5678
2345.6789
3456.7890
But not:
123.4567
Right now I do this:
double number = Math.Ceiling ( random.NextDouble ( ) * 10000000 ) * 0.001;
but that doesn't always give me 8 digits.
Any clever tricks to do this?
Try random.Next(10000000, 99999999+1) / 10000.0d;
EDIT: added more 9s
EDIT2: fixed the 1 minus issue
EDIT3: added more 0s, how did my answer get upvoted so much?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With