Created
June 1, 2016 11:10
-
-
Save Phuseos/c2f9e98f37a11da3d5f5b95cdd2e5eaa to your computer and use it in GitHub Desktop.
Generate random number (C#)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Void that generates a random number | |
//Call by using RandomInt(0, 100) where 0 is the minimum number and 100 the max | |
public static int GetRandom { get; set; } | |
void RandomInt(int MinRandom, int MaxRandom) | |
{ | |
Random r = new Random(); | |
GetRandom = r.Next(MinRandom, MaxRandom); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment