2014/07/20

Generate random number in C#

Random rnd = new Random();
int dice = rnd.Next(1, 7); // creates a number between 1 and 6
int card = rnd.Next(52); // creates a number between 0 and 51
view raw gistfile1.cs hosted with ❤ by GitHub

No comments:

Post a Comment