Click here to Skip to main content
15,613,470 members
Articles / Programming Languages / C#

Tagged as



How to generate many random various numbers?

Rate me:
Please Sign up or sign in to vote.
1.00/5 (2 votes)
12 Sep 2011CPOL
Found this little peace of code in book and kept it.using System.Security.Cryptography;public static int RandomNumber(int maxvalue){ RandomGenerator random = RandomGenerator.Create(); byte[] r = new byte[1]; random.GetBytes(r); double val = (double)r[0]/byte.MaxValue; ...


Daily Counts


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Web Developer
Belgium Belgium
Developer within C#, Dynamics NAV (Navision), Php environments.

Comments and Discussions