how we can auto generate decimal number in asp.net...
like 1.2,1.3,3.5,6.03 etc
Thanks...
Bharat Bhushan
how we can auto generate decimal number in asp.net...
like 1.2,1.3,3.5,6.03 etc
Thanks...
Bharat Bhushan
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Zoran HorvatPosted Jul 27, 2011, 4:26 AM
This code will randomly generate decimal numbers in range [0, 1):
Random rnd = new Random();
decimal x = (decimal)rnd.NextDouble();
However, I doubt that is what you need.
So - how many decimal digits do you need? What is the overall range of the numbers? Do you need uniform distribution of values?
Zoran