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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Zoran HorvatRank #792 · 2.9K reputationPosted Jul 27, 2011, 12:26 AM EDT
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