+ 1

How can I generate random "decimals" in C#?

5th Feb 2019, 3:37 PM
Alex
2 Antworten
+ 2
Did a little search on google and did find 3 methods. 1) divide a integer generated value by 100 2) generate the integer part and the decimal part separately and concatenate in a string. 3) rnd.NextDouble() (where rnd is your random - object) I haven't used it myself, but you can try one of these methods http://csharpindepth.com/Articles/Chapter12/Random.aspx
6th Feb 2019, 8:18 PM
sneeze
sneeze - avatar
0
sneeze Thank U so much!!
7th Feb 2019, 10:49 AM
Alex